Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site umcp-cs.UUCP
Path: utzoo!linus!philabs!prls!amdimage!amdcad!amd!vecpyr!lll-crg!gymble!umcp-cs!chris
From: chris@umcp-cs.UUCP (Chris Torek)
Newsgroups: net.unix-wizards,net.bugs.4bsd
Subject: Re: Strange behaviour of select() call when ^Z typed, (4.2BSD)
Message-ID: <1724@umcp-cs.UUCP>
Date: Mon, 30-Sep-85 11:43:51 EDT
Article-I.D.: umcp-cs.1724
Posted: Mon Sep 30 11:43:51 1985
Date-Received: Fri, 4-Oct-85 04:34:22 EDT
References: <568@wjvax.UUCP>
Organization: U of Maryland, Computer Science Dept., College Park, MD
Lines: 29
Xref: linus net.unix-wizards:12220 net.bugs.4bsd:1483

This was fixed long ago; here once again is the correct code from
/sys/sys/sys_generic.c$selwakeup():

selwakeup(p, coll)
	register struct proc *p;
	int coll;
{

	if (coll) {
		nselcoll++;
		wakeup((caddr_t)&selwait);
	}
	if (p) {
		int s = spl6();
		if (p->p_wchan == (caddr_t)&selwait) {
			if (p->p_stat == SSLEEP)
				setrun(p);
			else
				unsleep(p);
		}
		else if (p->p_flag & SSEL)
			p->p_flag &= ~SSEL;
		splx(s);
	}
}
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland