From 90b34f8e6feb4dabc8da0d782cf5146318cfc02a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 18 Jan 2009 17:15:34 +0100 Subject: main: moved code to daemon.c Moved changeToUser(), cleanUpPidFile(), killFromPidFile() to daemon.c. These are daemonization functions. --- src/daemon.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/daemon.h') diff --git a/src/daemon.h b/src/daemon.h index f2ea58c5f..8f1b70313 100644 --- a/src/daemon.h +++ b/src/daemon.h @@ -21,13 +21,32 @@ #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 -- cgit v1.2.3