From owner-freebsd-bugs Tue Jan 19 07:30:08 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA26494 for freebsd-bugs-outgoing; Tue, 19 Jan 1999 07:30:08 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA26383 for ; Tue, 19 Jan 1999 07:30:00 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id HAA16004; Tue, 19 Jan 1999 07:30:01 -0800 (PST) Received: (from nobody@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA15595; Tue, 19 Jan 1999 07:20:23 -0800 (PST) (envelope-from nobody) Message-Id: <199901191520.HAA15595@hub.freebsd.org> Date: Tue, 19 Jan 1999 07:20:23 -0800 (PST) From: N/A@FreeBSD.ORG To: freebsd-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: www-1.0 Subject: bin/9569: top(1) ignores tty EOF condition. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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