diff options
author | Max Kellermann <max@duempel.org> | 2008-12-30 16:28:13 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-30 16:28:13 +0100 |
commit | 6c0f5fc6125a478fd50074880ed7fcac9fd9063e (patch) | |
tree | 0249671839bc1ccf0211838fab4f9176d59aa026 /src/daemon.h | |
parent | 671480814c643cd094978e4a0db76687fbddec4f (diff) | |
download | mpd-6c0f5fc6125a478fd50074880ed7fcac9fd9063e.tar.gz mpd-6c0f5fc6125a478fd50074880ed7fcac9fd9063e.tar.xz mpd-6c0f5fc6125a478fd50074880ed7fcac9fd9063e.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/daemon.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/daemon.h b/src/daemon.h index da83b85a8..f2ea58c5f 100644 --- a/src/daemon.h +++ b/src/daemon.h @@ -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); |