This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ssh hanging with -f option

Hi All...

Can someone else take a look at debugging this? In a win2k environment,

ssh -f localhost sleep 10


ssh -f localhost echo test

for example hang with all of the current released software. See below for 
more deails.



>From: "Karl M" <>
>Subject: ssh hanging with -f option--a workaround
>Date: Fri, 27 Jul 2001 07:08:31 -0700
>Hi All...
>I first saw the following problem with openssh-2.5.2p1 or 2.9p1. The 
>is that when I use the -f option with the ssh client, it hangs (with
>CygWin). I checked my patch file against openssh-2.9p2-3. Because several
>others have had this same problem, my updated patch is attached for anyone
>who needs to use the -f option to ssh.
>I don't have a solution to the ssh hanging problem when it is forked off as
>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
>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.
>Get your FREE download of MSN Explorer at
><< OpenSSH-2.9p2-3-Hang-Patch >>
>Unsubscribe info:
>Bug reporting:

Get your FREE download of MSN Explorer at

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]