Date: Tue, 19 Jan 1999 07:20:23 -0800 (PST) From: N/A@FreeBSD.ORG To: freebsd-gnats-submit@FreeBSD.ORG Subject: bin/9569: top(1) ignores tty EOF condition. Message-ID: <199901191520.HAA15595@hub.freebsd.org>
index | next in thread | raw e-mail
>Number: 9569
>Category: bin
>Synopsis: top(1) ignores tty EOF condition.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jan 19 07:30:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: Juha Nurmela
>Release: 3.0-CURRENT
>Organization:
ACME Inc.
>Environment:
FreeBSD pena.oh5nxo.ampr.org
3.0-CURRENT FreeBSD 3.0-CURRENT #8:
Fri Jan 15 20:38:02 EET 1999
junki@pena.oh5nxo.ampr.org:/usr/src/sys/compile/PENA
i386
>Description:
top(1) stays (hyperventilating) running after
"xterm -e top" is terminated with windowmanager,
as top does not check read(2) for EOF.
There might be problems elsewhere, too, (xterm & pty signals),
but EOF checking should be good to do anyway.
top seems to expect hangup signal.
pty default flags have -clocal set, i'm using pdksh.
>How-To-Repeat:
xterm -e top
delete window with manager
ps shows top still running
>Fix:
/usr/src/contrib/top/top.c
about line 667
/* wait for either input or the end of the delay period */
! if (select(32, &readfds, NULL, NULL, &timeout) != 0) /* -1 or 1*/
about line 678
! if (read(0, &ch, 1) != 1) ch = 'q';
if ((iptr = strchr(command_chars, ch)) == NULL)
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901191520.HAA15595>
