Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

(tye)Re: Forcing return from Net::SSH::Perl connection

by tye (Sage)
on May 22, 2001 at 11:07 UTC ( #82178=note: print w/replies, xml ) Need Help??

in reply to Forcing return from Net::SSH::Perl connection

The most common cause of this is that stdout and stderr are still open in the subprocess so reading the end of that/those "pipe(s)" doesn't get end-of-file until the subprocess dies (or closes stdout and stderr). So redirect stdout and sterr to a file: $ssh->cmd("~/ >startup.log 2>&1 &")

If that still doesn't work, then you probably have an issue with controlling terminal and/or process groups so you'll probably have to "daemonize" the script (see "perldoc -q daemon").

        - tye (but my friends call me "Tye")

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2016-10-26 01:18 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (330 votes). Check out past polls.