Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.unix.programmer Subject: Re: pause(3) vs. sigpause(2) Message-ID: <27338@mimsy.umd.edu> Date: 1 Nov 90 00:07:11 GMT References: <43321@eerie.acsu.Buffalo.EDU> <717@inews.intel.com> <722@inews.intel.com> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 17 In article <722@inews.intel.com> bhoughto@cmdnfs.intel.com (Blair P. Houghton) writes: >... it seems `pause()' waits for >whatever signals are currently unblocked, and `sigpause(0)' >unblocks everything (only for the duration of the wait) and >then waits. (sigpause(n) would use n as a signal mask). Correct. As the manual page states, sigpause(mask) atomically sets the signal mask to `mask' and waits for a signal, then restores the signal mask to whatever it was before. pause() is effectively equivalent to sigpause(sigblock((sigmask_t)0)). (Use sigblock(0L) in old systems, or sigblock(0) if you do not care about 2.10BSD.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 405 2750) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris