Subject: Re: OpenSSH and WinCVS in Windows 9x
From: Laurent Pinchart <[email-masked]>
To: egor duda <[email-masked]>
Cc: [email-masked]
Date: Thu, 8 Aug 2002 13:56:37 +0200

Hi Egor,

First of all, thanks for your help.

> To debug the problem a little further you can try to use variable
>
> ========================================================================
> $CVS_CLIENT_LOG
>
> Used for debugging only in client-server mode. If set, everything send
> to the server is logged into `$CVS_CLIENT_LOG.in' and everything send
> from the server is logged into `$CVS_CLIENT_LOG.out'.
> ========================================================================

I had to modify the WinCVS code to support the CVS_CLIENT_LOG environment 
variable (WinCVS emulates an environment from the contents of the 
configuration dialog boxes), but that works fine

> and cvs protocol description, which can be found here, for example:
> http://www.loria.fr/~molli/cvs/doc/cvsclient_5.html

I analyzed the log files, and found no error. After some investigation, I ran 
accross the following line in the request section:

"When the client is done, it drops the connection."

This does not seem to happen.

WinCVS creates the ssh process by calling CreateProcess, which has stdin and 
stdout redirected to pipes. The pipes are then converted to C file 
descriptors, which in turn are converted to FILE pointers. Closing those 
FILEs doesn't make ssh terminate.

I tried to modify the WinCVS code, and closed all the pipe handles right after 
creating the child process (ssh). This doesn't make the child process 
terminate.

I suppose that it is then a bug in OpenSSH/Cygwin. I'll try to investigate in 
the OpenSSH sources. My guess is that OpenSSH calls select() on the standard 
input, and fails to detect that the pipe has been closed. Once again, this 
only occurs in Win98, not in Win2k.

I'm not very familiar with pipes on windows, so I'd appreciate help on this 
subject.

Laurent Pinchart

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/