|
further details
the following program given in
book advance programming under UNIX
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
int daemon_init(void)
{
pid_t pid;
if((pid = fork() ) < 0)
return (-1);
else
if (pid != 0)
exit(0);
setsid();
chdir("/");
umask(0);
return (0);
}
which i have tried generates errors in compilation
|