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

People
Owner: Nobody in particular
Requestors: markhn [...] rpi.edu
Cc:
AdminCc:

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 bestpractical.com
X-Rpi-Sa-Score: 0.00 () [Hold at 15.00] 22489(25),22490(-25)
X-Spam-Score: -6.9
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 1F749240206 for <cpan-bug+daemon-generic [...] hipster.bestpractical.com>; Tue, 7 Dec 2010 10:22:10 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I0xLorYeOCbZ for <cpan-bug+daemon-generic [...] hipster.bestpractical.com>; Tue, 7 Dec 2010 10:22:08 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id F276024002A for <bug-daemon-generic [...] rt.cpan.org>; 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 x16.dev (10.0.100.26) by x1.dev with QMQP; 7 Dec 2010 15:22:07 -0000
Received: from smtp7.server.rpi.edu (HELO smtp7.server.rpi.edu) (128.113.2.227) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Tue, 07 Dec 2010 07:22:04 -0800
Received: from localhost.localdomain (webmail1.server.rpi.edu [128.113.2.169]) by smtp7.server.rpi.edu (8.13.1/8.13.1) with ESMTP id oB7FLof4000401 for <bug-daemon-generic [...] rt.cpan.org>; Tue, 7 Dec 2010 10:22:01 -0500
Delivered-To: cpan-bug+daemon-generic [...] hipster.bestpractical.com
Subject: Daemon::Generic::gd_daemonize() should fork() after setsid()
X-Spam-Check-BY: 16.mx.develooper.com
Date: Tue, 07 Dec 2010 10:22:14 -0500
X-Browser: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.04 (lucid) Firefox/3.6.12 GTB7.1
X-Spam-Level:
To: bug-daemon-generic [...] rt.cpan.org
Content-Transfer-Encoding: binary
X-Scanned-BY: CanIt (www . roaringpenguin . com) on 128.113.2.227
From markhn [...] rpi.edu 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 6.0.1.32
Content-Disposition: inline
X-Webmail-User: markhn [...] mail.rpi.edu
Message-ID: <201012071522.oB7FLof4000401 [...] smtp7.server.rpi.edu>
Reply-To: "Nicholas R. Markham" <markhn [...] rpi.edu>
Organization: Rensselaer Polytechnic Institute
X-Http_host: webmail.rpi.edu
Return-Path: <markhn [...] rpi.edu>
X-Original-To: cpan-bug+daemon-generic [...] hipster.bestpractical.com
X-RT-Mail-Extension: daemon-generic
X-Canitpro-Stream: outgoing
X-Originating-Ip: 13.13.16.2
From: "Nicholas R. Markham" <markhn [...] rpi.edu>
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. http://h21007.www2.hp.com/portal/download/files/unprot/stk/tru64_stk/impacts/i260.html) 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 [...] smtp7.server.rpi.edu>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <201012071522.oB7FLof4000401 [...] smtp7.server.rpi.edu>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-18812-1305857679-1057.63704-0-0 [...] rt.cpan.org>
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 Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.