Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

(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")

Comment on (tye)Re: Forcing return from Net::SSH::Perl connection
Download Code

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 about the Monastery: (2)
As of 2015-10-09 02:10 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (232 votes), past polls