Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!decwrl!sun!shannon From: shannon@sun.uucp (Bill Shannon) Newsgroups: net.unix-wizards,net.bugs.4bsd Subject: Re: Strange behaviour of select() call when ^Z typed, (4.2BSD) Message-ID: <2846@sun.uucp> Date: Tue, 1-Oct-85 04:02:03 EDT Article-I.D.: sun.2846 Posted: Tue Oct 1 04:02:03 1985 Date-Received: Thu, 3-Oct-85 04:44:59 EDT References: <568@wjvax.UUCP> Organization: Sun Microsystems, Inc. Lines: 18 Xref: watmath net.unix-wizards:15062 net.bugs.4bsd:1782 > When this [sample program] is executed, and ^Z is typed at the prompt (i.e. while the > program is sitting in the select()), the program does stop, but then > its status changes. The csh detects a stopped state, but the program's > process in fact exits. This bug is (seemingly) intermittent. I have > other programs which sit on select()'s for input which may or may not > die when a SIGTSTP signal is sent to them. > > Does anyone out there know what is happening? If so, I would appreciate > hearing about it. In sys_generic.c/selwakeup(), change the call to setrun(p) to unselect(p). selwakeup() should not have started the process running without checking to see if it was stopped. By starting the process running, it ended up actually getting the SIGTSTP signal and dieing, something that can not normally happen. Bill Shannon Sun Microsystems, Inc. Brought to you by Super Global Mega Corp .com