clean up used processes
Posted by jaymzter (jaymzter), 13 February 2008I'm calling ssh from within an Expect package I've written. The calling program calls it as such:
Here's the main guts of the package cmasg:
Everything works great, but I've noticed the local ssh session never dies. After a while I run out of resources (this is a Cygwin environment).
In the package I tried to set a variable PID to the ssh spawn process and then kill that PID at the end of the "while", but that didn't work
Posted by jaymzter (jaymzter), 13 February 2008sorry about that, when I hit "Preview", it gets posted for some reason.
Also, everything does exit properly, except the initial ssh process spawned from the cmasg package
Posted by jaymzter (jaymzter), 13 February 2008thanks to what I learned on this site I figured it out. I had to move any exit commands and anything else above the "return" call in the package.
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: firstname.lastname@example.org • WEB: http://www.wellho.net • SKYPE: wellho