Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
c440faa9
Commit
c440faa9
authored
Nov 07, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log: redirect stdout/stderr to /dev/null if syslog is used
Don't hold a file descriptor on root's tty when syslog is used for logging.
parent
375fd5ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
NEWS
NEWS
+1
-0
log.c
src/log.c
+4
-1
No files found.
NEWS
View file @
c440faa9
...
...
@@ -61,6 +61,7 @@ ver 0.16 (20??/??/??)
* removed options --create-db and --no-create-db
* state_file: save only if something has changed
* database: eliminated maximum line length
* log: redirect stdout/stderr to /dev/null if syslog is used
* obey $(sysconfdir) for default mpd.conf location
* build with large file support by default
* require GLib 2.16
...
...
src/log.c
View file @
c440faa9
...
...
@@ -271,7 +271,10 @@ void setup_log_output(bool use_stdout)
{
fflush
(
NULL
);
if
(
!
use_stdout
)
{
if
(
out_filename
!=
NULL
)
{
if
(
out_filename
==
NULL
)
out_fd
=
open
(
"/dev/null"
,
O_WRONLY
);
if
(
out_fd
>=
0
)
{
redirect_logs
(
out_fd
);
close
(
out_fd
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment