sigaction() question - Unix

This is a discussion on sigaction() question - Unix ; Does sigaction() always follow the BSD signal behaviour on every system if the SA_RESETHAND flag is not specified? Ie it does *not* reset the signal to SIG_DFL? Also does it always prevent recursive signals if you don't specify the SA_NOMASK ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: sigaction() question

  1. sigaction() question

    Does sigaction() always follow the BSD signal behaviour on every
    system if the SA_RESETHAND flag is not specified? Ie it does *not*
    reset the signal to SIG_DFL? Also does it always prevent recursive
    signals if you don't specify the SA_NOMASK flag?

    Thanks

    B2003

  2. Re: sigaction() question

    thagor2008 wrote:

    > Does sigaction() always follow the BSD signal behaviour on every
    > system if the SA_RESETHAND flag is not specified? Ie it does *not*
    > reset the signal to SIG_DFL?


    Yes. POSIX requires it.

    > Also does it always prevent recursive
    > signals if you don't specify the SA_NOMASK flag?


    I assume you mean SA_NODEFER. If you don't specify SA_NODEFER _and_
    you don't specify SA_RESETHAND then the signal will be masked on entry
    to the signal handler. However, if you specify SA_RESETHAND then some
    systems may behave as if you had also specified SA_NODEFER.

    --
    Geoff Clare

+ Reply to Thread