Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Net::OpenSSH - Long running remote perl script doesnt bring back the control

by vsespb (Hermit)
on Jul 12, 2013 at 20:23 UTC ( #1044072=note: print w/ replies, xml ) Need Help??


in reply to Net::OpenSSH - Long running remote perl script doesnt bring back the control

Maybe, because just like Net::SSH::Perl ( Re^3: Net::SSH::Perl doesn't like long commands ) it's not protected from EINTR etc


Comment on Re: Net::OpenSSH - Long running remote perl script doesnt bring back the control
Re^2: Net::OpenSSH - Long running remote perl script doesnt bring back the control
by sudhakar.betha (Initiate) on Jul 12, 2013 at 22:58 UTC

    Got this working now.Thanks first of all for replying. This was my first post here !!!

    The problem was in using 'fork' inside the remote perl that was getting executed. Earlier I fork'ed the process in the remote perl and left them in the same shell. This time, I fork'ed the process and ran them as background processes.

    $pid = fork(); if ( $pid == 0 ) {system("$cmd &") || warn ("Could not exec $cmd.\n"); + exit 0;}

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (13)
As of 2014-12-19 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (78 votes), past polls