summaryrefslogtreecommitdiffstats
path: root/libdaemon/dfork.h
diff options
context:
space:
mode:
Diffstat (limited to 'libdaemon/dfork.h')
-rw-r--r--libdaemon/dfork.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/libdaemon/dfork.h b/libdaemon/dfork.h
index fcb32c3..7d9b62a 100644
--- a/libdaemon/dfork.h
+++ b/libdaemon/dfork.h
@@ -27,11 +27,11 @@
#ifdef __cplusplus
extern "C" {
#endif
-
+
/** \mainpage libdaemon
*
* libdaemon
- *
+ *
* For a brief explanation of libdaemons's purpose, have a look on the
* README file. Thank you!
*
@@ -43,7 +43,7 @@ extern "C" {
/** \file
*
- * Contains an API for doing a daemonizing fork().
+ * Contains an API for doing a daemonizing fork().
*
* You may daemonize by calling daemon_fork(), a function similar to
* the plain fork(). If you want to return a return value of the
@@ -100,13 +100,39 @@ int daemon_retval_wait(int timeout);
*/
int daemon_retval_send(int s);
+/** This variable is defined to 1 iff daemon_close_all() and daemon_close_allv() are supported.*/
+#define DAEMON_CLOSE_ALL_AVAILABLE 1
+
/** 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 */
+/** Same as daemon_close_all but takes an array of fds, terminated by
+ * -1 */
int daemon_close_allv(const int except_fds[]);
+/** This variable is defined to 1 iff daemon_unblock_sigs() and daemon_unblock_sigsv() are supported.*/
+#define DAEMON_UNBLOCK_SIGS_AVAILABLE 1
+
+/** Unblock all signals except those passed. List needs to be
+ * terminated by -1. */
+int daemon_unblock_sigs(int except, ...);
+
+/** Same as daemon_unblock_sigs() but takes an array of signals,
+ * terminated by -1 */
+int daemon_unblock_sigsv(const int except[]);
+
+/** This variable is defined to 1 iff daemon_reset_sigs() and daemon_reset_sigsv() are supported.*/
+#define DAEMON_RESET_SIGS_AVAILABLE 1
+
+/** Reset all signal handlers except those passed. List needs to be
+ * terminated by -1. */
+int daemon_reset_sigs(int except, ...);
+
+/** Same as daemon_reset_sigs() but takes an array of signals,
+ * terminated by -1 */
+int daemon_reset_sigsv(const int except[]);
+
#ifdef __cplusplus
}
#endif