listen: moved redirect_stdin() to daemon.c

redirect_stdin() is a daemonization function, and disconnecting from
the standard input is always a good idea for MPD.
This commit is contained in:
Max Kellermann
2008-12-30 16:28:13 +01:00
parent 671480814c
commit 6c0f5fc612
4 changed files with 34 additions and 29 deletions

View File

@@ -21,6 +21,12 @@
#include "cmdline.h"
/**
* Close stdin (fd 0) and re-open it as /dev/null.
*/
void
daemonize_close_stdin(void);
void
daemonize(Options *options);