daemonize(3)

NAME
daemonize() - a simple fork function for non-network daemons

SYNOPSIS
#include "fwfunc.h"

int daemonize()

DESCRIPTION
The deamonize function sets SIGHUP and SIGALRM hadnlers to ignore, then forks, parent exits and child starts a new session. `Daemon running' message is recorded into syslog.

RETURN VALUES
0 if ok, -1 if fork fails.

SEE ALSO
signal(3),setsid(2)

HISTORY
present in fwtk since v1