# sigset_t - overview of system data types - man(3type) - [phpMan]

[_system_data_types_(7)](https://www.chedong.com/phpMan.php/man/systemdatatypes/7/markdown)              Miscellaneous Information Manual              [_system_data_types_(7)](https://www.chedong.com/phpMan.php/man/systemdatatypes/7/markdown)

## NAME
       system_data_types - overview of system data types

## DESCRIPTION
       _siginfo_t_
              _Include_: _<signal.h>_.  Alternatively, _<sys/wait.h>_.

              typedef struct {
                  int      si_signo;  /* Signal number */
                  int      si_code;   /* Signal code */
                  pid_t    si_pid;    /* Sending process ID */
                  uid_t    si_uid;    /* Real user ID of sending process */
                  void    *si_addr;   /* Memory location which caused fault */
                  int      si_status; /* Exit value or signal */
                  union sigval si_value;  /* Signal value */
              } siginfo_t;

              Information  associated with a signal.  For further details on this structure (includ‐
              ing additional, Linux-specific fields), see [**sigaction**(2)](https://www.chedong.com/phpMan.php/man/sigaction/2/markdown).

              _Conforming_ _to_: POSIX.1-2001 and later.

              _See_  _also_:  [**pidfd_send_signal**(2)](https://www.chedong.com/phpMan.php/man/pidfdsendsignal/2/markdown),  [**rt_sigqueueinfo**(2)](https://www.chedong.com/phpMan.php/man/rtsigqueueinfo/2/markdown),  [**sigaction**(2)](https://www.chedong.com/phpMan.php/man/sigaction/2/markdown),  [**sigwaitinfo**(2)](https://www.chedong.com/phpMan.php/man/sigwaitinfo/2/markdown),
              [**psiginfo**(3)](https://www.chedong.com/phpMan.php/man/psiginfo/3/markdown)

       _sigset_t_
              _Include_: _<signal.h>_.  Alternatively, _<spawn.h>_, or _<sys/select.h>_.

              This is a type that represents a set of signals.  According to POSIX, this shall be an
              integer or structure type.

              _Conforming_ _to_: POSIX.1-2001 and later.

              _See_  _also_:  [**epoll_pwait**(2)](https://www.chedong.com/phpMan.php/man/epollpwait/2/markdown),  [**ppoll**(2)](https://www.chedong.com/phpMan.php/man/ppoll/2/markdown), [**pselect**(2)](https://www.chedong.com/phpMan.php/man/pselect/2/markdown), [**sigaction**(2)](https://www.chedong.com/phpMan.php/man/sigaction/2/markdown), [**signalfd**(2)](https://www.chedong.com/phpMan.php/man/signalfd/2/markdown), **sigpend‐**
              [**ing**(2)](https://www.chedong.com/phpMan.php/man/ing/2/markdown), [**sigprocmask**(2)](https://www.chedong.com/phpMan.php/man/sigprocmask/2/markdown), [**sigsuspend**(2)](https://www.chedong.com/phpMan.php/man/sigsuspend/2/markdown), [**sigwaitinfo**(2)](https://www.chedong.com/phpMan.php/man/sigwaitinfo/2/markdown), [**signal**(7)](https://www.chedong.com/phpMan.php/man/signal/7/markdown)

## NOTES
       The structures described in this manual page shall contain, at least, the  members  shown  in
       their definition, in no particular order.

       Most  of  the integer types described in this page don't have a corresponding length modifier
       for the [**printf**(3)](https://www.chedong.com/phpMan.php/man/printf/3/markdown) and the [**scanf**(3)](https://www.chedong.com/phpMan.php/man/scanf/3/markdown) families of functions.  To print a  value  of  an  integer
       type  that doesn't have a length modifier, it should be converted to _intmax_t_ or _uintmax_t_ by
       an explicit cast.  To scan into a variable of an integer type that doesn't have a length mod‐
       ifier, an intermediate temporary variable of type _intmax_t_ or _uintmax_t_ should be used.  When
       copying from the temporary variable to the destination variable, the  value  could  overflow.
       If  the type has upper and lower limits, the user should check that the value is within those
       limits, before actually copying the value.  The example below  shows  how  these  conversions
       should be done.

### Conventions used in this page
       In  "Conforming  to" we only concern ourselves with C99 and later and POSIX.1-2001 and later.
       Some types may be specified in earlier versions of one of these standards, but in the  inter‐
       ests of simplicity we omit details from earlier standards.

       In  "Include", we first note the "primary" header(s) that define the type according to either
       the C or POSIX.1 standards.  Under "Alternatively", we note additional headers that the stan‐
       dards specify shall define the type.

## EXAMPLES
       The program shown below scans from a string and prints a value stored in a variable of an in‐
       teger type that doesn't have a length modifier.  The appropriate conversions from and to _int‐_
       _max_t_, and the appropriate range checks, are used as explained in the notes section above.

       #include <stdint.h>
       #include <stdio.h>
       #include <stdlib.h>
       #include <sys/types.h>

       int
       main (void)
       {
           static const char *const str = "500000 us in half a second";
           suseconds_t us;
           intmax_t    tmp;

           /* Scan the number from the string into the temporary variable. */

           sscanf(str, "%jd", &tmp);

           /* Check that the value is within the valid range of suseconds_t. */

           if (tmp < -1 || tmp > 1000000) {
               fprintf(stderr, "Scanned value outside valid range!\n");
               exit(EXIT_FAILURE);
           }

           /* Copy the value to the suseconds_t variable 'us'. */

           us = tmp;

           /* Even though suseconds_t can hold the value -1, this isn't
              a sensible number of microseconds. */

           if (us < 0) {
               fprintf(stderr, "Scanned value shouldn't be negative!\n");
               exit(EXIT_FAILURE);
           }

           /* Print the value. */

           printf("There are %jd microseconds in half a second.\n",
                   (intmax_t) us);

           exit(EXIT_SUCCESS);
       }

## SEE ALSO
       [**feature_test_macros**(7)](https://www.chedong.com/phpMan.php/man/featuretestmacros/7/markdown), [**standards**(7)](https://www.chedong.com/phpMan.php/man/standards/7/markdown)

Linux man-pages 6.7                          2023-10-31                         [_system_data_types_(7)](https://www.chedong.com/phpMan.php/man/systemdatatypes/7/markdown)
