Home | History | Annotate | Download | only in sigaction
      1 <assertions>
      2   <assertion id="1" tag="ref:XSH6:41442:41443 pt:CX">
      3 If the argument "act" is not a null pointer, it points to a structure
      4 specifying the action to be associated with the specified signal.
      5   </assertion>
      6   <assertion id="2" tag="ref:XSH6:41443:41444 pt:CX">
      7 If the argument "oact" is not a null pointer, the action previously
      8 associated with the signal is stored in the location pointed to by
      9 the argument "oact".
     10   </assertion>
     11   <assertion id="3" tag="ref:XSH6:41444:41445 pt:CX">
     12 If the argument "act" is a null pointer, signal handling is unchanged.
     13   </assertion>
     14   <assertion id="4" tag="ref:XSH6:41446:41447 pt:CX">
     15 The SIGKILL and SIGSTOP signals shall not be added to the signal mask
     16 using sigaction(), but will not result in sigaction reporting a failure.
     17   </assertion>
     18   <assertion id="5" tag="ref:XSH6:41449:41450 pt:CX">
     19 If the SA_SIGINFO flag is cleared in the sa_flags field of the sigaction
     20 structure, the sa_handler field indentifies the action to be associated
     21 with the specified signal.
     22   </assertion>
     23   <assertion id="6" tag="ref:XSH6:41450:41453 pt:XSI,RTS">
     24 If the SA_SIGINFO flag is set in the sa_flags field, and the implementation
     25 supports the Realtime Signals Extension option or the XSI Extension option,
     26 the sa_sigaction field specifies a signal catching function.
     27   </assertion>
     28   <assertion id="7" tag="ref:XSH6:41453:41455 pt:CX">
     29 If the SA_SIGINFO bit is cleared and the sa_handler field specifies a
     30 signal catching function, or if the SA_SIGINFO bit is set, the sa_mask
     31 field indentifies a set of signals that shall be added to the signal mask
     32 of the thread before the signal-catching function is invoked.
     33   </assertion>
     34   <assertion id="8" tag="ref:XSH6:41455:41458 pt:CX">
     35 If the sa_handler field specifies a signal-catching function, the sa_mask
     36 field indentifies a set of signals that shall be added to the process'
     37 signal mask before the signal-catching function is invoked.
     38   </assertion>
     39   <assertion id="9" tag="ref:XSH6:41461:41462 pt:CX">
     40 If the SA_NOCLDSTOP bit is set in the sa_flags field when calling sigaction
     41 on SIGCHLD, then the SIGCHLD signal will not be generated when children stop
     42 or stopped children continue.
     43   </assertion>
     44   <assertion id="10" tag="ref:XSH6:41463:41466 pt:CX">
     45 If sig is SIGCHLD and the SA_NOCLDSTOP flag is not set in sa_flags, and the
     46 implementation supports the SIGCHLD signal, then a SIGCHLD signal shall be
     47 generated for the calling process whenever any of its child processes
     48 stop.
     49   </assertion>
     50   <assertion id="11" tag="ref:XSH6:41463:41465 pt:XSI">
     51 Not setting the SA_NOCLDSTOP flag on the SIGCHLD signal will result in a
     52 SIGCHLD signal being generated for the parent process whenever any of it's
     53 stopped children are continued.
     54   </assertion>
     55   <assertion id="12" tag="ref:XSH6:41470:41471 pt:XSI">
     56 If the SA_ONSTACK flag is set in sa_flags, and an alternate signal stack has
     57 been declared with sigaltstack(), the signal shall be delivered to the calling
     58 process on the stack.  Otherwise, the signal shall be delivered on the current
     59 stack.
     60   </assertion>
     61   <assertion id="13" tag="ref:XSH6:41471:41472 pt:XSI">
     62 If the SA_ONSTACK flag is not set in sa_flags, the signal shall be delivered
     63 on the current stack.
     64   </assertion>
     65   <assertion id="14" tag="ref:XSH6TC2:42543:42550 pt:XSI">
     66 If the SA_RESETHAND flag is set in sa_flags, then the disposition of the signal
     67 shall be reset to SIG_DFL and the SA_SIGINFO flag shall be cleared on entry
     68 to the signal handler. The routine behaves as if SA_NODEFER was also set.
     69   </assertion>
     70   <assertion id="15" tag="ref:XSH6:41477:41480 pt:XSI">
     71 If the SA_RESETHAND flag is not set in sa_flags, the disposition of the signal
     72 shall not be modified on entry to the signal handler.
     73   </assertion>
     74   <assertion id="16" tag="ref:XSH6:41481:41486 pt:XSI">
     75 Interruptable functions (functions specified to fail with errno set to [EINTR]
     76 when interrupted by a signal) shall restart and shall not fail with [EINTR]
     77 if the SA_RESTART flag is set in sa_flags.
     78   </assertion>
     79   <assertion id="17" tag="ref:XSH6:41481:41486 pt:CX">
     80 If the SA_RESTART flag is not set in sa_flags, then interruptable functions
     81 will fail with with errno set to [EINTR].
     82   </assertion>
     83   <assertion id="18" tag="ref:XSH6:41494:41495 pt:XSI">
     84 If the SA_SIGINFO flag is not set for a signal and the signal is caught then
     85 the signal-catching function shall be entered as "void func(int signo);".
     86   </assertion>
     87   <assertion id="19" tag="ref:XSH6:41487:41488 pt:CX">
     88 If the SA_SIGINFO flag is set for a signal and the signal is caught then
     89 the signal -catching function shall be entered as
     90 "void func(int signo, siginfo_t *info, void *context);"
     91   </assertion>
     92   <assertion id="20" tag="ref:XSH6:41515:41522 pt:XSI">
     93 If the SA_NOCLDWAIT flag is set and sig equals SIGCHLD, then child processes
     94 of the calling process shall not be trasformed into zombie processes when
     95 they terminate.
     96   </assertion>
     97   <assertion id="21" tag="ref:XSH6:41515:41522 pt:XSI">
     98 If a process has set the SA_NOCLDWAIT flag on SIGCHLD and subseqeunetly waits
     99 for a its children, and the process has not unwaited-for children that were
    100 trasformed into zombie processes, it shall block until all of its children
    101 terminate, and wait(), waitid(), and waitpid() shall fail and set errno to
    102 [ECHILD].
    103   </assertion>
    104   <assertion id="22" tag="ref:XSH6:41523:41526 pt:XSI">
    105 If the SA_NODEFER flag is set for a signal and the signal is caught, the signal
    106 shall not be added to the process' signal mask on entry to the signal handler
    107 unless it is included in sa_mask.
    108   </assertion>
    109   <assertion id="23" tag="ref:XSH6:41523:41526 pt:XSI">
    110 If the SA_NODEFER flag is not set for a signal and the signal is caught, the
    111 signal shall be added to the process' signal mask on entry to the signal
    112 handler.
    113   </assertion>
    114   <assertion id="24" tag="ref:XSH6:41527:41529 pt:CX">
    115 When a signal-catching function installed by sigaction() is entered, a new
    116 signal mask is calculated and installed for the duration of the signal-catching
    117 function (or until a call to either sigprocmask() or sigsuspend() is made.)
    118   </assertion>
    119   <assertion id="25" tag="ref:XSH6:41527:41532 pt:CX">
    120 The new signal mask installed on entry to a signal-catching function installed
    121 by sigaction shall be calculated as the union of the current signal mask
    122 and the value of sa_mask for the signal being delivered (unless SA_NODEFER
    123 or SA_RESETHAND is set) and then including the signal being delivered.
    124   </assertion>
    125   <assertion id="26" tag="ref:XSH6:41527:41532 pt:CX">
    126 If and when the user's signal handler returns normally, the original signal
    127 mask is restored.
    128   </assertion>
    129   <assertion id="27" tag="ref:XSH6:41541:41541 pt:CX">
    130 If sigaction fails, no new signal handler is installed.
    131   </assertion>
    132   <assertion id="28" tag="ref:XSH6TC2:42606:42610 pt:CX">
    133 If the signal action was set with the signal() function, getting it into oact
    134 then reinstalling it with act must be valid.
    135   </assertion>
    136   <assertion id="29" tag="ref:XSH6TC2:42616:42622 pt:RTS">
    137 If SA_SIGINFO is set and realtime signals extension is supported, queueable
    138 signals generated by sigqueue or some other functions are delivered in FIFO
    139 order.
    140   </assertion>
    141   <assertion id="30" tag="ref:XSH6TC2:42630:42631 pt:CX">
    142 sigaction returns -1 and errno is set to EINVAL if signal number is invalid
    143 or an attempt to do an operation which is not allowed is made.
    144   </assertion>
    145 </assertions>
    146