Library /sys$common/syshlp/helplib.hlb  —  CRTL  sigemptyset
    Initializes the signal set to exclude all signals.

    Format

      #include  <signal.h>

      int sigemptyset  (sigset_t *set);

1  –  Argument

 set

    The signal set.

2  –  Description

    The sigemptyset function initializes the signal set pointed to
    by set such that you exclude all signals. A call to sigemptyset
    or sigfillset must be made at least once for each object of type
    sigset_t prior to any other use of that object.

    This function operates on data objects that you can address by
    the application, not on any set of signals known to the system.
    For example, this function does not operate on the set blocked
    from delivery to a process or the set pending for a process.

    See also sigfillset.

3  –  Example

      The following example shows how to generate and use a signal
      mask that blocks only the SIGINT signal from delivery:

               #include <signal.h>
               int return_value;
               sigset_t newset;
                 . . .
               sigemptyset(&newset);
               sigaddset(&newset, SIGINT);
               return_value = sigprocmask (SIG_SETMASK, &newset, NULL);

4  –  Return Values

    0                  Indicates success.
    -1                 Indicates an error; the global errno is set to
                       indicate the error.
Close Help