No such thing as a small change | |
PerlMonks |
Perl - running remote script doesn't return back the control to perl.by bshah (Novice) |
on Mar 20, 2014 at 18:23 UTC ( [id://1079129]=perlquestion: print w/replies, xml ) | Need Help?? |
bshah has asked for the wisdom of the Perl Monks concerning the following question: Hi, I'm pretty new to perl. I've written a small sample code which restarts my smtp service. The issue with the below code is, it after it runs /root/scripts/restart.sh on smailhostqa, the control doesn't comes back to Perl. I have to do ctrl-c to exit the script. Since I will be running this from the cron job, I would like to proper exit the script instead of hanging after the command. I thought $ssh->close(); should have closed the ssh session but it didn't. My question is:
Your help is greatly appreciated.
Janitorial edit: Code tags fixed: Use '</code>', not '<\code>' to close a code tag. Also repaired markup per Writeup Formatting Tips.
Back to
Seekers of Perl Wisdom
|
|