Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Remotely Executing a background commandby starX (Chaplain) |
on Jul 31, 2008 at 13:53 UTC ( [id://701421]=note: print w/replies, xml ) | Need Help?? |
Why not fork off a child process after confirming your ssh connection is successful. Have the child process execute the command you need to check the return value of, and then signal the parent that it (the child) was successful, and that the parent is free to do its thing.
Disclaimer, I've never done this in Perl before, but it works splendidly in C. On POSIX compliant systems, at least. You might want to give perlipc a read if you think this interprocess communication route might be the way for you to go.
--starX
In Section
Seekers of Perl Wisdom
|
|