On Thu, 21 Apr 2011, Sam Umbach wrote:
> The best solution I've found so far is to immediately call setpgid in
> both the parent and child process. Then call fork a second time in the
> child, and call setsid in the grandchild (which goes on to become the
> daemon). I've never seen this method fail.
I'm still not clear on why nohup is not the right solution for this.
I've attached a patch that just calls dkimf_stdio() along any code path
that is committed to calling fork() as well as in the produced offspring.
I'm not convinced it's the right solution, but at least you can confirm
that this would solve the problem.
- TEXT/PLAIN attachment: PATCH
Received on Thu Apr 21 2011 - 22:50:00 PST