ssh hanging--a workaround
Karl M
karlm30@hotmail.com
Sat May 26 14:22:00 GMT 2001
Hi Corinna...
I don't have a solution to the ssh hanging problem when it is forked off as
in
ssh -f localhost sleep 10
but have a workaround. The patch file is attached.
I looked at both ssh and sshd when they hang (both in their respective
select calls--which makes sense because they are both waiting for something
to do). The problem is in ssh. When ssh is forked after authentication, the
select call fails to return after the fifth time that it is invoked. This
problem only seems to occur when ssh has invoked daemon before starting the
interactive session, but the problem shows up four select calls later. As
part of my debugging, I forced select to return by setting a timeout. The
timeout does force it to return--and in fact, there is IO waiting to be
processed. So a one second timeout in the select call is my workaround for
now.
The read and write bit masks before and after the select call always look
fine. It is not an ssh bug as far as I can tell.
ssh localhost sleep 10
ssh -f localhost sleep 10
are the two test cases I used for debugging--to compare the behavior.
Also, in the past, I needed pipes and you did not. Now we all have pipes.
But why do you think that in the past, I needed pipes and you did not?
Thanks,
...Karl
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
More information about the Cygwin
mailing list