On Thu, Apr 4, 2013 at 10:44 PM, David Korn <[email protected]> wrote:
> cc:  [email protected]
> Subject: Re: Re: [ast-developers] ksh93 alpha update
> --------
>
>
>> ksh test.sh
>> ~/bin/ksh stoptrap.sh
>> inchild
>> childdone
>> CHLD trap, pid=2902, status=exited
>>
>> I would expect that the CHLD trap is called three times, once for the
>> child being stopped, once for the child being resumed (SIGCONT) and
>> once for the child termination.
>>
>> Irek
>>
>
> Currently ksh only executes CHLD traps for process completion.  I was
> concerned that I might break existing scripts if they get triggers
> for other reasons.

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.

>
> With ksh93u, you can use $! to get the pid of the process that completed
> and $? to get the exit status.

Is this documented in ksh(1)?
>
> I will consider adding trap and continue trap calls and see what breaks
> and then decide whether to allow them.

Thank you.
> David Korn
> [email protected]

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

Reply via email to