On 8 April 2013 17:32, David Korn <[email protected]> wrote:
> cc:  [email protected]
> Subject: Re: Re: Re: [ast-developers] ksh93 alpha update
> --------
>
>> The contra argument is that any person can do a kill -CHLD $victimpid
>> and scripts should guard themselves against such actions. The 2nd
>> contra argument is that scripts should use the output of the jobs
>> builtin to check for changes - if there isn't any change then nothing
>> should happen.
>>
>>
>
> The shell will ignores any CHLD that does not produce a change
> in status for any process.
>
> It does check for STOP and CONTINUE but currently these do not
> trigger the trap.  I think that it makes sense to trigger the
> trap in these cases, but my concern is backward compatibility.
> I plan on trying to add these and see what breaks.

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
-- 
Cedric Blancher <[email protected]>
Institute Pasteur
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to