diff options
author | Max Kellermann <max@duempel.org> | 2009-01-18 17:15:34 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-18 17:15:34 +0100 |
commit | 90b34f8e6feb4dabc8da0d782cf5146318cfc02a (patch) | |
tree | 394a6135f7b7382916578693c571f08b4ac90bee /src/daemon.h | |
parent | 1f0dfb4407344996bbe874525413275b79da12b3 (diff) | |
download | mpd-90b34f8e6feb4dabc8da0d782cf5146318cfc02a.tar.gz mpd-90b34f8e6feb4dabc8da0d782cf5146318cfc02a.tar.xz mpd-90b34f8e6feb4dabc8da0d782cf5146318cfc02a.zip |
main: moved code to daemon.c
Moved changeToUser(), cleanUpPidFile(), killFromPidFile() to
daemon.c. These are daemonization functions.
Diffstat (limited to 'src/daemon.h')
-rw-r--r-- | src/daemon.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/daemon.h b/src/daemon.h index f2ea58c5f..8f1b70313 100644 --- a/src/daemon.h +++ b/src/daemon.h @@ -22,12 +22,31 @@ #include "cmdline.h" /** + * Kill the MPD which is currently running, pid determined from the + * pid file. + */ +void +daemonize_kill(void); + +/** * Close stdin (fd 0) and re-open it as /dev/null. */ void daemonize_close_stdin(void); +/** + * Change to the configured Unix user. + */ +void +daemonize_set_user(void); + void daemonize(Options *options); +/** + * Deletes the pidfile which was created when MPD started. + */ +void +daemonize_delete_pidfile(void); + #endif |