aboutsummaryrefslogtreecommitdiffstats
path: root/src/daemon.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2009-01-18daemon: removed unused variable "userpwd"Max Kellermann1-8/+4
This causes a segmentation fault...
2009-01-18daemon: pass "detach" flag to daemonize()Max Kellermann1-3/+4
This way, we don't have to pass the full "Options" object to daemonize().
2009-01-18daemon: added daemonize_init(), daemonize_finish()Max Kellermann1-38/+62
The constructor/destructor functions parse and free the configuration properly. This way, we don't have to load the pid file path more than once.
2009-01-18main: moved code to daemon.cMax Kellermann1-0/+97
Moved changeToUser(), cleanUpPidFile(), killFromPidFile() to daemon.c. These are daemonization functions.
2009-01-17conf: no CamelCase, part IMax Kellermann1-1/+2
Renamed functions, types, variables.
2009-01-13daemon: don't check the setsid() return valueMax Kellermann1-3/+1
There is only one valid error condition for setsid(): when the current process is already the process group leader. This is non-critical.
2009-01-13daemon: don't fork twice to daemonizeMax Kellermann1-8/+0
To detach from the parent process, fork once and make the old process exit. No need to do that twice.
2008-12-30daemon: simplified daemonize_close_stdin()Max Kellermann1-16/+6
Don't bother to call fstat() or isatty() on STDIN_FILENO.
2008-12-30listen: moved redirect_stdin() to daemon.cMax Kellermann1-0/+26
redirect_stdin() is a daemonization function, and disconnecting from the standard input is always a good idea for MPD.
2008-12-30main: moved daemonize() to daemon.cMax Kellermann1-0/+86