Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by vsespb (Chaplain)
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

Replies are listed 'Best First'.
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 taking refuge in the Monastery: (11)
As of 2016-09-29 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (560 votes). Check out past polls.