pause(3) vs. sigpause(2)
Chris Torek
chris at mimsy.umd.edu
Thu Nov 1 11:07:11 AEST 1990
In article <722 at inews.intel.com> bhoughto at 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 at cs.umd.edu Path: uunet!mimsy!chris
More information about the Comp.unix.programmer
mailing list