Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: system() status weirdness

by pc88mxer (Vicar)
on Mar 28, 2008 at 18:18 UTC ( #677079=note: print w/replies, xml ) Need Help??


in reply to system() status weirdness

That's because Net::SSH::Expect is installing the following SIGCHLD handler:
sub reapChild { do {} while waitpid(-1,WNOHANG) > 0; }
Doing this will give you your statuses back:
use Net::SSH::Expect; ... $SIG{CHLD} = 'DEFAULT'; ... system(...);
I could be wrong, but I doubt the reapChild handler is absolutely necessary, so you're probably safe just use default handler even when you make Net::SSH::Expect calls.

Replies are listed 'Best First'.
Re^2: system() status weirdness
by monk2b (Pilgrim) on Mar 28, 2008 at 20:13 UTC
    This works great. Thanks alot ++.

    Bob

    I got 99 problems, but a @%$()_ ain't one.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://677079]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2022-06-27 11:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (88 votes). Check out past polls.

    Notices?