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)

X-Canit-Stats-ID: Bayes signature not available
MIME-Version: 1.0
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"
X-Virus-Scanned: Debian amavisd-new at
X-Rpi-Sa-Score: 0.00 () [Hold at 15.00] 22489(25),22490(-25)
X-Spam-Score: -6.9
Received: from localhost (localhost []) by (Postfix) with ESMTP id 1F749240206 for <cpan-bug+daemon-generic [...]>; Tue, 7 Dec 2010 10:22:10 -0500 (EST)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id I0xLorYeOCbZ for <cpan-bug+daemon-generic [...]>; Tue, 7 Dec 2010 10:22:08 -0500 (EST)
Received: from ( []) by (Postfix) with SMTP id F276024002A for <bug-daemon-generic [...]>; Tue, 7 Dec 2010 10:22:07 -0500 (EST)
Received: (qmail 12803 invoked by uid 103); 7 Dec 2010 15:22:07 -0000
Received: from ( by with QMQP; 7 Dec 2010 15:22:07 -0000
Received: from (HELO ( by (qpsmtpd/0.80) with ESMTP; Tue, 07 Dec 2010 07:22:04 -0800
Received: from localhost.localdomain ( []) by (8.13.1/8.13.1) with ESMTP id oB7FLof4000401 for <bug-daemon-generic [...]>; Tue, 7 Dec 2010 10:22:01 -0500
Delivered-To: cpan-bug+daemon-generic [...]
Subject: Daemon::Generic::gd_daemonize() should fork() after setsid()
Date: Tue, 07 Dec 2010 10:22:14 -0500
X-Browser: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101027 Ubuntu/10.04 (lucid) Firefox/3.6.12 GTB7.1
To: bug-daemon-generic [...]
Content-Transfer-Encoding: binary
X-Scanned-BY: CanIt (www . roaringpenguin . com) on
From markhn [...] Tue Dec 7 10: 22:10 2010
X-Spam-Status: No, score=-6.9 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5] autolearn=ham
X-Mailer: EMUmail
Content-Disposition: inline
X-Webmail-User: markhn [...]
Message-ID: <201012071522.oB7FLof4000401 [...]>
Reply-To: "Nicholas R. Markham" <markhn [...]>
Organization: Rensselaer Polytechnic Institute
Return-Path: <markhn [...]>
X-Original-To: cpan-bug+daemon-generic [...]
X-RT-Mail-Extension: daemon-generic
X-Canitpro-Stream: outgoing
From: "Nicholas R. Markham" <markhn [...]>
X-Bayes-Prob: 0.0001 (Score 0)
X-RT-Original-Encoding: ascii
Content-Length: 836
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!
MIME-Version: 1.0
In-Reply-To: <201012071522.oB7FLof4000401 [...]>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <201012071522.oB7FLof4000401 [...]>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-18812-1305857679-1057.63704-0-0 [...]>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 13
Fixed in 0.72

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

Please report any issues with to