Skip Menu |

This queue is for tickets about the forks CPAN distribution.

Report information
The Basics
Id: 22709
Status: resolved
Priority: 0/
Queue: forks

People
Owner: RYBSKEJ [...] cpan.org
Requestors: alban.crequy [...] seanodes.com
Cc:
AdminCc:

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



CC: Pierre Phaneuf <pierre.phaneuf [...] seanodes.com>, Erwan Velu <erwan.velu [...] seanodes.com>
Subject: [PATCH] Bug in bug-forks in END block
Date: Tue, 31 Oct 2006 18:25:51 +0100
To: bug-forks [...] rt.cpan.org
From: Alban Crequy <alban.crequy [...] seanodes.com>
Hello, I have a bug on perl-forks-0.19 in the function _unblock_sigset(). When reading the code of perl-forks-0.20, I think the bug is still present. _unblock_sigset() may be called from the END block. In END blocks, the variable $? is reserved for the return code. But POSIX::sigprocmask, called from _unblock_sigset(), may change the variable $?, which is bad. Symptoms without the attached patch: My main function returns with "exit 42;" but perl returns 255. With the attached patch, perl always returns with the value I setted in the "exit" statement. I'm not sure though that this patch is the right solution for this problem. $ perl -v, uname -a, distro This is perl, v5.8.7 built for i386-linux Linux alban 2.6.12-25mdk #1 Fri Aug 18 15:09:47 MDT 2006 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz unknown GNU/Linux Mandriva Linux release 2006.0 (Official) for i586 Have a nice day, Alban

Message body is not shown because sender requested not to inline it.

Alban, I've confirmed the bug as well and will incorporate an appropriate patch in the (nearly complete) next release of forks. Thanks, Eric
Resolved in forks 0.21 and added appropriate test case in test suite.