Frank Cusack fcusack at
Wed Aug 7 10:13:37 EST 2002

On Tue, Aug 06, 2002 at 02:32:33PM -0600, Eric Garff wrote:
> This isn't an actual reply to any one person, but here is my experience:
> I have tested both the patches by Jani Jaakkol and Frank Cusack (Frank's
> I tried both the pty and non-pty changes).  I still get the hang, here
> is my setup.
> This is entered as a cronjob on one server to run every 15 minutes:
> /home/httpd/bin/cache/glb/gTest >>/home/httpd/bin/cache/glb/gTest.log
> 2>>/home/httpd/bin/cache/glb/gTest.log
>   here are the guts of the script:
> 	/usr/local/bin/ssh hostname /bin/ls /some/dir | /usr/bin/wc -l ;
> /bin/ls /some/other/dir | /usr/bin/wc -l ; /bin/ls /some/other/dir |
> /usr/bin/wc -l"
> The script is actually a php script that does a number of other things
> before it executes the ssh (database to grab hostnames, etc.), but that
> is how the ssh portion pans out.  After executing the command it then
> starts a 20 second timer, and if the ssh session is still alive, it
> kills it.  Also, if I run the script by hand (not crond) it completes
> just fine (no hang).
> Any ideas?  Your time is MUCH appreciated.

You're doing something wrong.  Your ssh command is not an example of
the hang-on-exit problem.


More information about the openssh-unix-dev mailing list