SYS V sigset(2)

David F. Carlson dave at micropen
Wed Jun 15 06:23:46 AEST 1988


I have a program in which it is "useful" to have reliable signals,
and therefore I must use sigset(2) (under System Vr3.0).

Problem is that the man pages tell me that when I am in a handler the
signal is automatically set to SIG_HOLD.  SIG_HOLD queues up to 1 occurance
if the signal is again received.  However, I am finding by way of a stack
dump that my signal handler is being entered *again and again* even though
sigset(2) is being used throughout my entire process (for that signal and all
others.)  Of course, the exclusive resource assumed by the signal handler is
locked by a previous entry and deadlock results.  Why is the documented sighold 
not stopping further occurances when I am in the signal handler?

Also, a related question:
	How does sigpause(2) differ from pause(2) for waiting?  The man pages
	detail dire consequences for mixing signal(2) and sigset(2) but I see 
	little relation between pause(2) and sigset(2).  Is there a hidden hazard
	or is this only a problem of wating within a signal handler itself?

Any help would be appreciated.  Funny how out of date things like Bach's
book are when it is barely 2 years old.

-- 
David F. Carlson, Micropen, Inc.
...!{ames|harvard|rutgers|topaz|...}!rochester!ur-valhalla!micropen!dave

"The faster I go, the behinder I get." --Lewis Carroll



More information about the Comp.unix.questions mailing list