Help with 4.3 mod to kill uninteruptable procs.

Chris Siebenmann cks at hawkwind.utcs.toronto.edu
Sun Feb 24 11:13:34 AEST 1991


pat at orac.pgh.pa.us (Pat Barron) writes:
| This has been the case forever (well, at least since V7) - when you come
| out of a sleep(), you *must* check that the reason you were sleeping is
| no longer true....

 Unless your code is careful to make sure that it is the only one
which can consume the particular resource which it is sleeping on;
consider, for example, a system call tracing facility, where you have
a sepperate process that drains the trace buffers into a disk file.
Also, one common strategy for dealing with the 'other people may have
taken this resource already' is
	while (!resource)
		sleep(resource, priority);
If you whack the process and get it to come out of the sleep, and the
resource isn't available, the process will just go back to sleep,
which isn't particularly helpful for the original poster's purpose.

--
		V9: the kernel where you can do
			fgrep <something> */*.[ch]
		and not get "Arguments too long".
cks at hawkwind.utcs.toronto.edu	           ...!{utgpu,utzoo,watmath}!utgpu!cks



More information about the Comp.unix.wizards mailing list