bpowell@osc.edu (Brian Powell) (10/08/90)
I'm not sure if I'm posting this question to exactly the right groups, but here goes anyway... We are running X11R4 and the Korn shell on Sun-3's and Sun-4's running SunOS 4.0.3 and 4.1. The ksh works perfectly from inside an xterm (on a "pty" device) until the xterm gets a request to quit, either by the window manager or by its own internal "Quit" menu option. Then the ksh does not seem to find out that it has no tty anymore. It continues to run as if in some kind of infinite loop. While usually spending most of its time in an I/O wait state, the ksh suddenly goes into a run state after its "pty" line is closed and sucks up A LOT of the cpu cycles until it is manually killed with a SIGTERM or SIGKILL. When the ksh is in this "runaway" state, it ignores SIGHUP. Quitting X11 has become a pain for Korn shell users, since they cannot just close down everything. Instead they must go one at a time through all of their xterm windows and type "exit" at each ksh prompt before closing down the server and clients. The version of the Korns shell we are running is "06/03/86b". SunOS's C-shell does not seem to have this problem. The ksh works fine from a hard wired tty, it exits nicely when the line drops. Thanks in advance for any help or hints...