SPUG: Forked Children talking back to the parent?

ced at carios2.ca.boeing.com ced at carios2.ca.boeing.com
Thu Jan 18 14:55:34 CST 2001

> My question on the interrupt driven approach is, what
> happens if I am processing a signal from one child in
> the parent and I receive a signal from another child? 
> Does it interrupt the code already processing the
> first signal?  I haven't done much signal processing.

Modern reliable signal implementations will block 
subsequent occurences of a given signal while the 
first occurrence is being processed. I believe 
that's what occurs unless you do something
to change the default mask. 

The unfortunate part though is the ones that
arrive later aren't queued. So, if say, a 
SIGCHLD signal arrives five times while the 
handler's processing the first SIGCHLD , only
one of the five will be processed. 

That's why as was mentioned earlier, signal
handlers should do as little as possible. 
The handler that's complex is liable to
lose some recently arrived signals.   

You might want to take at Chapter 16 in the "Perl
Cookbook" or even "Advanced Programming in the Unix
Environment" by Stevens for more info.

Charles DeRykus

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/

More information about the spug-list mailing list