Skip Menu |

This queue is for tickets about the Daemon-Generic CPAN distribution.

Report information
The Basics
Id: 63704
Status: resolved
Priority: 0/
Queue: Daemon-Generic

Owner: Nobody in particular
Requestors: markhn [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Daemon::Generic::gd_daemonize() should fork() after setsid()
Date: Tue, 07 Dec 2010 10:22:14 -0500
To: bug-daemon-generic [...]
From: "Nicholas R. Markham" <markhn [...]>
Download (untitled) / with headers
text/plain 836b
I'm not entirely sure if this is a bug or if it's intentional. However, I claim that in Daemon::Generic 0.71, the gd_daemonize() function could benefit from a slightly different sequence of system calls. Specifically, I would suggest fork...setsid...fork instead of fork...fork...setsid. I did a little research and couldn't find a clear answer on whether it's necessary to fork after calling setsid. Clearly it isn't as important as the first fork, but it seems like it's a good idea on at least some platforms. (e.g. Moreover, I can't find any reference to forking twice before calling setsid, so that makes me think the author intended the "usual" fork...setsid...fork paradigm and transposed the last two inadvertently. Love the module!
Fixed in 0.72

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to