Hi,

I have an application featuring a verbose mode and a daemon mode.
It's working just fine in verbose mode but in daemon mode it doesn't quite
seem to be functioning properly (doesn't send off signalss over TCP/IP or
write anything to the GPIOs - that's why i belive exit() is
terminating "too much"),
I get into Daemon mode with a fork command followed by exit() to be
specific, it looks like:
[C++]
pid = fork();
if (pid < 0)
{
exit(EXIT_FAILURE);
}
else if (pid > 0)
{
exit(EXIT_SUCCESS);
}

umask(0);

sid = setsid();
[/C++]
Is there a problem with this? Do I miss anything?
Thanks,
Ron
--
weeks of software enineering safe hours of planing