Xref: utzoo comp.unix.internals:2147 comp.unix.wizards:24236 Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ncar!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!cert!orac!pat From: pat@orac.pgh.pa.us (Pat Barron) Newsgroups: comp.unix.internals,comp.unix.wizards Subject: Re: Help with 4.3 mod to kill uninteruptable procs. Message-ID: <305@orac.pgh.pa.us> Date: 22 Feb 91 05:27:21 GMT References: <1991Feb19.001941.29928@lynx.CS.ORST.EDU> <1991Feb21.152845.29019@cbnews.att.com> Reply-To: pat@orac.pgh.pa.us (Pat Barron) Organization: Pat's Sun-2/120 Lines: 18 In article <1991Feb21.152845.29019@cbnews.att.com> rock@cbnews.att.com (Y. Rock Lee) writes: >In article <1991Feb19.001941.29928@lynx.CS.ORST.EDU> gatesl@mist.cs.orst.edu (Lee Gates) writes: >> Will the above method cause a race condition resulting from >>the fact that the process probably assumes that the next time it runs >>it will have the resource it was sleeping on? And if so, I would >>appreciate some other suggestions as to how to solve this problem. > >Yes, the process will think it has the resource it was sleeping on. Uhh, nope. When a particular even occurs, *all* processes waiting on that event are awakened. By the time you run again, someone else may have snarfed up the resource you were waiting for. 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.... --Pat. Brought to you by Super Global Mega Corp .com