4 #ifndef RUDIMENTS_DAEMONPROCESS_H
5 #define RUDIMENTS_DAEMONPROCESS_H
7 #include <rudiments/private/daemonprocessincludes.h>
9 #ifdef RUDIMENTS_NAMESPACE
13 class daemonprocessprivate;
35 static int64_t checkForPidFile(
const char *filename);
44 static bool createPidFile(
const char *filename,
64 int32_t runAsUser(
const char *username)
const;
75 int32_t runAsGroup(
const char *groupname)
const;
81 int32_t runAsUserId(uid_t uid)
const;
87 int32_t runAsGroupId(gid_t gid)
const;
92 static void handleShutDown(
93 void (*shutdownfunction)(int32_t));
97 static void handleCrash(
void (*crashfunction)(int32_t));
103 static void waitForChildren();
111 static void dontWaitForChildren();
113 #include <rudiments/private/daemonprocess.h>
117 #ifdef RUDIMENTS_NAMESPACE