Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: peterspeltz [...] yahoo.com
Cc:
AdminCc:

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



Subject: scp returns false even on success if a zombie reaper is active
Download (untitled) / with headers
text/plain 965b
Hi. Not sure if this is a bug or not. In short, a parent process has set SIG{CHLD} = &REAPER; so we dont get zombies. This reaper automatically reaps the child spawned in the Net::SCP::scp method causing that method to return false even on successful scps (because the "waitpid" call there returns -1). As a workaround I added this line before the system call in "Net::SCP::scp" method -- local SIG{CHLD} = 'DEFAULT'; This passes very limited testing but I do not foresee any problems with this. Do you? thanks, diff -u Net/SCP.pm.07 Net/SCP.pm --- Net/SCP.pm.07 2006-04-27 13:18:50.000000000 -0500 +++ Net/SCP.pm 2006-05-10 12:13:21.000000000 -0500 @@ -90,6 +90,8 @@ my($reader, $writer, $error ) = ( new IO::Handle, new IO::Handle, new IO::Handle ); $writer->autoflush(1);# $error->autoflush(1); + # pjs patch + local $SIG{CHLD} = 'DEFAULT'; my $pid = open3($writer, $reader, $error, @cmd ); waitpid $pid, 0; if ( $? >> 8 ) {
fixed in 0.08


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.