summaryrefslogtreecommitdiffstats
path: root/libdaemon/dfork.h
diff options
context:
space:
mode:
Diffstat (limited to 'libdaemon/dfork.h')
-rw-r--r--libdaemon/dfork.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libdaemon/dfork.h b/libdaemon/dfork.h
index b7effa1..fcb32c3 100644
--- a/libdaemon/dfork.h
+++ b/libdaemon/dfork.h
@@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif
-
+
/** \mainpage libdaemon
*
* libdaemon
@@ -100,6 +100,13 @@ int daemon_retval_wait(int timeout);
*/
int daemon_retval_send(int s);
+/** Close all file descriptors except those passed. List needs to be
+ * terminated by -1. FDs 0, 1, 2 will be kept open anyway. */
+int daemon_close_all(int except_fd, ...);
+
+/** Same as daemon_close_all but takes an array of fds, terminated by -1 */
+int daemon_close_allv(const int except_fds[]);
+
#ifdef __cplusplus
}
#endif