openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/glibc/2.29-r0/git/sysdeps/unix/sysv/linux/sigaction.c
int __libc_sigaction(int sig, const struct sigaction* act,
                     struct sigaction* oact)
{
    int result;

    struct kernel_sigaction kact, koact;

    if (act)
    {
        kact.k_sa_handler = act->sa_handler;
        memcpy(&kact.sa_mask, &act->sa_mask, sizeof(sigset_t));
        kact.sa_flags = act->sa_flags;
        SET_SA_RESTORER(&kact, act);
    }

    /* XXX The size argument hopefully will have to be changed to the
       real size of the user-level sigset_t.  */
    result = INLINE_SYSCALL_CALL(rt_sigaction, sig, act ? &kact : NULL,
                                 oact ? &koact : NULL, STUB(act, _NSIG / 8));

    if (oact && result >= 0)
    {
        oact->sa_handler = koact.k_sa_handler;
        memcpy(&oact->sa_mask, &koact.sa_mask, sizeof(sigset_t));
        oact->sa_flags = koact.sa_flags;
        RESET_SA_RESTORER(oact, &koact);
    }
    return result;
}
/* If ACT is not NULL, change the action for SIG to *ACT.
   If OACT is not NULL, put the old action for SIG in *OACT.  */
If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT.
If ACT is not NULL change the action for SIG to * ACT . If OACT is not NULL put the old action for SIG in * OACT .
int __libc_sigaction(int sig, const struct sigaction* act,
                     struct sigaction* oact)
{
    int result;
    struct kernel_sigaction kact, koact;
    if (act)
    {
        kact.k_sa_handler = act->sa_handler;
        memcpy(&kact.sa_mask, &act->sa_mask, sizeof(sigset_t));
        kact.sa_flags = act->sa_flags;
        SET_SA_RESTORER(&kact, act);
    }
    result = INLINE_SYSCALL_CALL(rt_sigaction, sig, act ? &kact : NULL,
                                 oact ? &koact : NULL, STUB(act, _NSIG / 8));
    if (oact && result >= 0)
    {
        oact->sa_handler = koact.k_sa_handler;
        memcpy(&oact->sa_mask, &koact.sa_mask, sizeof(sigset_t));
        oact->sa_flags = koact.sa_flags;
        RESET_SA_RESTORER(oact, &koact);
    }
    return result;
}
int __libc_sigaction ( int sig , const struct sigaction * act , struct sigaction * oact ) { int result ; struct kernel_sigaction kact , koact ; if ( act ) { kact . k_sa_handler = act -> sa_handler ; memcpy ( & kact . sa_mask , & act -> sa_mask , sizeof ( sigset_t ) ) ; kact . sa_flags = act -> sa_flags ; SET_SA_RESTORER ( & kact , act ) ; } result = INLINE_SYSCALL_CALL ( rt_sigaction , sig , act ? & kact : NULL , oact ? & koact : NULL , STUB ( act , _NSIG / 8 ) ) ; if ( oact && result >= 0 ) { oact -> sa_handler = koact . k_sa_handler ; memcpy ( & oact -> sa_mask , & koact . sa_mask , sizeof ( sigset_t ) ) ; oact -> sa_flags = koact . sa_flags ; RESET_SA_RESTORER ( oact , & koact ) ; } return result ; }
If ACT is not NULL, change the action for SIG to *ACT.
If ACT is not NULL change the action for SIG to * ACT .
/* XXX The size argument hopefully will have to be changed to the
       real size of the user-level sigset_t.  */