On Wed, Jun 6, 2012 at 12:29 PM, Roland Mainz <[email protected]> wrote:
> Hi!
>
> ----
>
> Just curious: Why doesn't the SIGCHLD handler in ksh93 use the
> |si_pid| (and paybe |si_status|) payload in siginfo (e.g. typically
> the signal provides the following information with the signal:
> -- snip --
>        /* SIGCHLD.  */
>        struct
>          {
>            __pid_t si_pid;     /* Which child.  */
>            __uid_t si_uid;     /* Real user ID of sending process.  */
>            int si_status;      /* Exit value or signal.  */
>            __clock_t si_utime;
>            __clock_t si_stime;
>          } _sigchld;
> -- snip --
> ) ?

That might help with a job control implementation:

from siginfo(3head):

   NOTES
     For  SIGCHLD signals, if  si_code is equal  to   CLD_EXITED,
     then   si_status  is equal to the exit value of the process;
     otherwise, it is equal to the signal that caused the process
     to   change state. For some implementations, the exact value
     of si_addr might not be available; in that case, si_addr  is
     guaranteed  to  be on the same page as the faulting instruc-
     tion or memory reference.

So siginfo for a SIGCHLD will be send then the child process
terminates OR if it gets stopped (SIGTSTP) ir resumed.

David/Glenn: Do all platforms supported by ksh93 have siginfo.h?

Irek

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

Reply via email to