Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!elroy.jpl.nasa.gov!ncar!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!uace0 From: kevin@nuchat.UUCP (Kevin Brown) Newsgroups: comp.os.minix Subject: Bizarre SIGINT behavior (PC Minix) Message-ID: <1991Jan6.042939.10130@menudo.uh.edu> Date: 6 Jan 91 04:29:39 GMT Sender: uace0@menudo.uh.edu (ATARI Computer Enthusiasts) Reply-To: uace0@menudo.uh.edu.UUCP (ATARI Computer Enthusiasts) Organization: Teenage Mutant Ninja NiceGuys [tm] :-) Lines: 114 Sorry for the length of this article, but I'm describing the manifestation of a bug in Minix in detail. Perhaps the detailed description I provide below will help people track this thing down. I have been having some rather strange problems with the Minix console driver on my system. This problem occurs seemingly regardless of WHAT console driver you're using. It occurs with Gordon Irlam's virtual console driver running under Minix-386 (thanks, Bruce!), and it occurs on vintage PC-Minix 1.5.10 (floppy version, no frills). Allow me to explain in the context of virtual consoles, which is where I originally thought the problem actually existed: When running an application like less, which can act as the tail end of a pipe but which takes input from the terminal, if I shell out of such an application (thus getting me a subshell with the standard '$' prompt) and, when the prompt is displayed, hit the INT key (usually the delete key), all my processes for that terminal will die (and I'll be given the login prompt). Now, less doesn't know what terminal you're running on, and since it has to be able to act as a member of a pipe, it will open /dev/tty as standard input and standard output before executing the shell. Quite reasonable, right? I thought that less was the cause of the problem, but it's not. Do the following: sh , at which point it stops and gives me the login prompt and will then accept a login. I don't understand this behavior at all. Since the virtual console driver knows which virtual console you're on, it (supposedly) just sends a SIGINT to the process group leader associated with the virtual terminal from which the INT key was pressed. At the point that you press the INT key, all the processes associated with the terminal (including the process group leader) are either catching SIGINT or ignoring it. Were this not the case, you would be able to simply do a "sh", which gives you a subshell, hit INT, and get the same results. This doesn't happen. In fact, let's say that you're on virtual terminal tty4. If you do a "sh