From owner-freebsd-bugs Thu May 10 3:20: 7 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5DB3C37B422 for ; Thu, 10 May 2001 03:20:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4AAK3n65594; Thu, 10 May 2001 03:20:03 -0700 (PDT) (envelope-from gnats) Date: Thu, 10 May 2001 03:20:03 -0700 (PDT) Message-Id: <200105101020.f4AAK3n65594@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: kern/27242: SIGHUP propgation failure to processes of switched user Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/27242; it has been noted by GNATS. From: Bruce Evans To: jhkang@isofree.net Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: kern/27242: SIGHUP propgation failure to processes of switched user Date: Thu, 10 May 2001 20:08:31 +1000 (EST) On Thu, 10 May 2001 jhkang@isofree.net wrote: > >Description: > Top utilitiy and may other utiltities that control terminal directly > and does not have explicit checking eof condition may not > die and captures cpu resource continuely > if an user switched another user, run the command and the controlling terminal > disconnected unexpectedly. > ... > >Fix: > APPLICATION LEVEL SOLUTION > check EOF condition in command reading loop. > patch top.c (/usr/src/usr.bin/top/top.c in FreeBSD 4.3) as following > ... > KERNEL(?) LEVEL? > I suspect something is blocking propating of SIGHUP signal to the processes. > The charge may be *kernel*, su or termcap lib. I believe SIGHUP propagation works as intended (if not correctly). There are cases where POSIX requires SIGHUP to _not_ be delivered to all the children. Applications that don't check for read() failing are just broken. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message