From d7dd2d885c3dc8711c04f564b06169bc1ccefe1d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 25 Dec 2015 17:15:03 +0100 Subject: daemonise MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/daemonise.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/daemonise.h') diff --git a/src/daemonise.h b/src/daemonise.h index 72a2fda..33c0aec 100644 --- a/src/daemonise.h +++ b/src/daemonise.h @@ -179,3 +179,21 @@ */ int daemonise(const char* name, int flags); + +/** + * 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); + -- cgit v1.2.3-70-g09d2