Davide Cittaro wrote:
Ok, another one: the process I would like to start is not a daemon itself. If I start it with "daemon" function it remains in foreground. Ok, I can play with '&' but is there a init function to start in background a process?
You just hijacked your own thread. Better to start a new one.
The workaround I have used in this situation is a wrapper script that redirects stdin, stdout, and stderr and backgrounds, but that is playing with '&' indirectly. Please post if you find a more elegant solution.
Phil