diff options
Diffstat (limited to 'daemon.h')
-rw-r--r-- | daemon.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/daemon.h b/daemon.h new file mode 100644 index 0000000..6cab88f --- /dev/null +++ b/daemon.h @@ -0,0 +1,30 @@ +/* + * Function to convert a running process into a "proper" daemon. + */ + +#ifndef _DAEMON_H +#define _DAEMON_H + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The argument is whether to ignore the death of child processes. The function + * return non-zero if all was OK, else zero if there was a problem. + */ +extern int daemon_start(int); + +#ifdef __cplusplus +} +#endif + +#endif |