Skip Menu |

This queue is for tickets about the Net-SCP-Expect CPAN distribution.

Report information
The Basics
Id: 34001
Status: resolved
Priority: 0/
Queue: Net-SCP-Expect

People
Owner: RYBSKEJ [...] cpan.org
Requestors: ian.brown [...] gmail.com
Cc:
AdminCc:

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



Subject: exit value is automatically set to -1 (255) when a program including threads uses 'Net::SCP::Expect' - this breaks Test::*
Date: Tue, 11 Mar 2008 16:04:36 -0700
To: bug-Net-SCP-Expect [...] rt.cpan.org
From: ashleyb <ian.brown [...] gmail.com>
when a script that uses threads also uses this module ('Net::SCP::Expect') then the return value of the script can automatically be set to -1 (255). This is because Net::SCP::Expect sets $SIG{CHLD} with a subroutine that reaps the children with: sub reapChild{ do {} while waitpid(-1,WNOHANG) > 0; # line 274 } always returns -1 and this becomes the exit value of the script. This breaks the Test::Harness as it figures this test file is failed because it has a non-zero exit value. to fix this just return zero from reapChild.
CHLD handler has been removed, as Expect is expected to reap it's own child processes correctly. Change also allows for better exception handling with Expect. Change applied to 0.13 release.
Subject: Re: [rt.cpan.org #34001] exit value is automatically set to -1 (255) when a program including threads uses 'Net::SCP::Expect' - this breaks Test::*
Date: Thu, 12 Jun 2008 13:26:34 -0700
To: bug-Net-SCP-Expect [...] rt.cpan.org
From: Ian Brown <ian.brown [...] gmail.com>
Thank you! On Jun 12, 2008, at 9:15 AM, Eric Rybski via RT wrote: <URL: http://rt.cpan.org/Ticket/Display.html?id=34001 > CHLD handler has been removed, as Expect is expected to reap it's own child processes correctly. Change also allows for better exception handling with Expect. Change applied to 0.13 release.