Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2016-12-05 03:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (72 votes). Check out past polls.