aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-12-25 16:54:39 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-25 16:55:05 +0100
commit995f5b53eaea97f08f7de433f4e51bb0d5610019 (patch)
tree18ed54c03d3cef2b6fdd84c70dd115e93b40b4f4 /include
parenttypo (diff)
downloadslibc-995f5b53eaea97f08f7de433f4e51bb0d5610019.tar.gz
slibc-995f5b53eaea97f08f7de433f4e51bb0d5610019.tar.bz2
slibc-995f5b53eaea97f08f7de433f4e51bb0d5610019.tar.xz
add undaemonise
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'include')
-rw-r--r--include/unistd.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/unistd.h b/include/unistd.h
index 4629e8e..963bb96 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1138,6 +1138,8 @@ int daemon(int, int)
* should be used instead of /run for the runtime data-files
* directory, in which the PID file is stored.
*
+ * This is a slibc extension.
+ *
* @etymology (Daemonise) the process!
*
* @param name The name of the daemon. Use a hardcoded value,
@@ -1174,6 +1176,23 @@ int daemon(int, int)
*/
int daemonise(const char*, int)
__GCC_ONLY(__attribute__((__nonnull__, __warn_unused_result__)));
+
+/**
+ * Remove the PID file created by `daemonise`. This shall
+ * always be called before exiting after calling `daemonise`,
+ * even if it failed.
+ *
+ * This is a slibc extension.
+ *
+ * @etymology (Un)link PID file created by `(daemonise)`!
+ *
+ * @return Zero on success, -1 on error.
+ *
+ * @throws Any error specified for unlink(3).
+ *
+ * @since Always.
+ */
+int undaemonise(void);
#endif