main: moved code to daemon.c
Moved changeToUser(), cleanUpPidFile(), killFromPidFile() to daemon.c. These are daemonization functions.
This commit is contained in:
19
src/daemon.h
19
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
|
||||
|
Reference in New Issue
Block a user