daemonizing not quite working :o
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:
pid = fork();
if (pid < 0)
else if (pid > 0)
sid = setsid();
Is there a problem with this? Do I miss anything?
weeks of software enineering safe hours of planing ;)