killpg(SIGHUP, loginshellpid) ?

Markus Friedl markus at openbsd.org
Fri Nov 30 06:15:46 EST 2001


in ssh v2, if the connection is closed, should the server do a
	killpg(SIGHUP, loginshellpid)

does this make sense?

-markus

Index: session.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/session.c,v
retrieving revision 1.108
diff -u -r1.108 session.c
--- session.c	11 Oct 2001 13:45:21 -0000	1.108
+++ session.c	29 Nov 2001 19:13:40 -0000
@@ -1607,8 +1607,13 @@
 	int i;
 	for(i = 0; i < MAX_SESSIONS; i++) {
 		Session *s = &sessions[i];
-		if (s->used) 
+		if (s->used) {
+			if (s->pid != 0) {
+				debug3("killpg %d", s->pid);
+				killpg(SIGHUP, s->pid);
+			}
 			session_close(s);
+		}
 	}
 }
 



More information about the openssh-unix-dev mailing list