cc:  [email protected]  [email protected]
Subject: Re: Barrier implementation using CHLD/stop traps (Re: [ast-developers] 
 ksh93 alpha update)
--------

> FYI a colleague found an innovative use of stop and continue for child
> processes: he implemented (using C and now he tries ksh93) a barrier
> mechanism. Each worker process completes a given task and then puts
> itself to sleep using the kill -STOP $$, for which the parent process
> (ksh93) gets the CHLD/stop trap as notification. The parent then wakes
> up the child when all child processes have reached the barrier.
> 
> His question now is: Is there an API to send kill -CONT to all child
> processes - maybe via the process group?
> 
> Ced
> 

First of all, the alpha I released last night does handle stop and
continue traps for CHLD.

Secondly, CHLD signals sent my a random process will be ignored
since only state changes trigger the trap.

Finally, if you don't use set -m in the script, and the
script is started by a job control shell, then
        kill -CONT -$$
will send a continue to all child processes (as well as itself)
and other processes in its process group.


David Korn
[email protected]
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to