Lets try this push again.. 2.5.1p2 bugs left.
Corinna Vinschen
vinschen at redhat.com
Thu Feb 22 20:01:03 EST 2001
On Thu, Feb 22, 2001 at 01:21:21AM -0600, mouring at etoh.eviladmin.org wrote:
>
> Things that are still outstanding:
>
> 1) Solaris/Redhat/HPUX session.c patch. I've not seen a ya or na on
> Kevin's pam patch from the Solaris group.
>
> 2) Odd Redhat/Debian scp/ssh issues. .. I'm baffled, and I can't
> replicate the bug. Nor have I seen anything remotely like it reported.
>
> 3) SCO.. Is it happy yet for compiling? =)
> [...]
> Anything else I'm missing for brokeness that was introduced between
> 2.3.0p1 and 2.5.1p1 that needs to be corrected? I'm expecting that
> 2.5.1p2 will stand for a long time. So speak up now. I want to put p2
> to rest with the next week and half so we can catch back up with the
> OpenBSD tree and head on to bigger and better problems. =)
OpenSSH sftp closes the sockets/pipes (dependent of the value of
USE_PIPES) and then kills it's underlying ssh by calling kill(ssh, SIGHUP).
This kills the underlying ssh immediately which results in breaking the
connection to sshd which in turn terminates without cleanly disconnecting
from the subsystem.
This results in a hanging sftp-server, waiting for `select' to
return on Windows/Cygwin systems. A graceful shutdown solves that
problem by itself without the need to kill the underlying ssh:
Index: sftp.c
===================================================================
RCS file: /cvs/openssh_cvs/sftp.c,v
retrieving revision 1.4
diff -u -p -r1.4 sftp.c
--- sftp.c 2001/02/09 13:40:04 1.4
+++ sftp.c 2001/02/18 16:59:27
@@ -246,11 +246,18 @@ main(int argc, char **argv)
interactive_loop(in, out);
+#if defined(HAVE_CYGWIN) && !defined(USE_PIPES)
+ shutdown(in, SHUT_RDWR);
+ shutdown(out, SHUT_RDWR);
+#endif
+
close(in);
close(out);
+#if !defined(HAVE_CYGWIN)
if (kill(sshpid, SIGHUP) == -1)
fatal("Couldn't terminate ssh process: %s", strerror(errno));
+#endif
if (waitpid(sshpid, NULL, 0) == -1)
fatal("Couldn't wait for ssh process: %s", strerror(errno));
Corinna
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen at redhat.com
More information about the openssh-unix-dev
mailing list