Strange behaviour of select() call when ^Z typed, (4.2BSD)
Chris Torek
chris at umcp-cs.UUCP
Tue Oct 1 01:43:51 AEST 1985
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 at umcp-cs ARPA: chris at maryland
More information about the Comp.unix.wizards
mailing list