Re: Trouble writing background-running program




does your code execute also the second fork() after setsid(), which is
essential to detach from the terminal properly?

A-ha! That must be it !

As I recall there is an example code function "daemon_init()" which you
could simply copy and paste for your project.

Well, the example lacks the second fork, and even though I *had* read
the explanation, I had skipped the (literally) fine print that says
that in
some cases it is recommended to do a second fork etc. etc.

Thanks,

Carlos
--
.