[PATCH]: Patch to fix hang on exit bug under Linux and add optional exit delay

Andreas Hasenack andreas at conectiva.com.br
Thu Nov 15 03:20:17 EST 2001


Here is a patch a colleague of mine did, please include him (and not
me, I'm just posting it here) in replies, he is not subscribed to
this list and I don't think he has already sent this patch here:

pcpa at conectiva.com.br

Comments?

diff -u openssh-2.9p1/clientloop.c openssh/clientloop.c
--- openssh-2.9p1/clientloop.c	Fri Apr 20 09:50:51 2001
+++ openssh/clientloop.c	Mon May  7 17:10:52 2001
@@ -840,8 +840,11 @@
 		/* Process buffered packets sent by the server. */
 		client_process_buffered_input_packets();
 
-		if (compat20 && session_closed && !channel_still_open())
+		if (compat20 && session_closed) {
+			if (channel_still_open())
+				channel_stop_listening();
 			break;
+		}
 
 		rekeying = (xxx_kex != NULL && !xxx_kex->done);
 
@@ -1186,6 +1189,7 @@
 	} else if (strcmp(rtype, "exit-status") == 0) {
 		success = 1;
 		exit_status = packet_get_int();
+		session_closed = 1;
 		packet_done();
 	}
 	if (reply) {



Em Wed, Nov 14, 2001 at 02:49:05PM +0100, Markus Friedl escreveu:
> why do you repeat posting this broken patch to the list?




More information about the openssh-unix-dev mailing list