aboutsummaryrefslogtreecommitdiffstats
path: root/src/daemon.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-30 16:28:13 +0100
committerMax Kellermann <max@duempel.org>2008-12-30 16:28:13 +0100
commit6c0f5fc6125a478fd50074880ed7fcac9fd9063e (patch)
tree0249671839bc1ccf0211838fab4f9176d59aa026 /src/daemon.h
parent671480814c643cd094978e4a0db76687fbddec4f (diff)
downloadmpd-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 'src/daemon.h')
-rw-r--r--src/daemon.h6
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);