Trouble killing processes in SysV/AT

Chris Torek chris at mimsy.UUCP
Sun May 1 02:32:24 AEST 1988


In article <51443 at sun.uucp> limes at sun.uucp (Greg Limes) writes:
>If the sleep priority is above PZERO, the [signalled] sleep() will return
>an error corresponding to "I was interrupted!".

Unless Sun has made some big kernel changes recently, this is not the
case.  See /sys/sys/kern_synch.c, at the label `psig' in sleep().

Returning an error from sleep would be a viable alternative to `catch'
and `throw' routines, although it would entail more work.  Every driver
that now sleeps interruptably might read

	while ((foo->status & READY) == 0) {
		if (sleep((caddr_t)foo, PFOO))
			return (EINTR);
	}

and one would be safe in ignoring the (new) return value from sleep
iff the sleep is uninterruptable.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list