From owner-freebsd-bugs Wed Aug 27 11:40:15 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA26785 for bugs-outgoing; Wed, 27 Aug 1997 11:40:15 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA26779 for ; Wed, 27 Aug 1997 11:40:13 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id EAA03347 for bugs@freebsd.org; Thu, 28 Aug 1997 04:36:53 +1000 Date: Thu, 28 Aug 1997 04:36:53 +1000 From: Bruce Evans Message-Id: <199708271836.EAA03347@godzilla.zeta.org.au> To: bugs@freebsd.org Subject: rlogin misses child death Sender: owner-freebsd-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Why does rlogin ignore SIGCHLD when it is stopped? Doing so causes it to miss the death of the child. To see the problem, rlogin somewhere, suspend rlogin, then kill the remote shell. Then de-suspend rlogin. Sometimes (more often than not here) the child starts up first. Then the parent doesn't exit until it attempts to write something and gets a SIGPIPE. telnet notices that the connection has gone away when it is de-suspended after being suspended using ^]z, but not when it has been suspended using ^]^Z. Bruce diff -c2 rlogin.c~ rlogin.c *** rlogin.c~ Wed Aug 6 09:51:11 1997 --- rlogin.c Thu Aug 28 04:15:37 1997 *************** *** 585,591 **** { mode(0); - (void)signal(SIGCHLD, SIG_IGN); (void)kill(cmdc == defltc.t_suspc ? 0 : getpid(), SIGTSTP); - (void)signal(SIGCHLD, catch_child); mode(1); sigwinch(0); /* check for size changes */ --- 585,589 ----