SIGEMPTYSET(3)             POSIX Programmer's Manual            SIGEMPTYSET(3)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       sigemptyset -- initialize and empty a signal set

SSYYNNOOPPSSIISS
       #include <signal.h>

       int sigemptyset(sigset_t *_s_e_t);

DDEESSCCRRIIPPTTIIOONN
       The _s_i_g_e_m_p_t_y_s_e_t() function initializes the signal set pointed to by
       _s_e_t, such that all signals defined in POSIX.1-2008 are excluded.

RREETTUURRNN VVAALLUUEE
       Upon successful completion, _s_i_g_e_m_p_t_y_s_e_t() shall return 0; otherwise, it
       shall return -1 and set _e_r_r_n_o to indicate the error.

EERRRROORRSS
       No errors are defined.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

EEXXAAMMPPLLEESS
       None.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

RRAATTIIOONNAALLEE
       The implementation of the _s_i_g_e_m_p_t_y_s_e_t() (or _s_i_g_f_i_l_l_s_e_t()) function
       could quite trivially clear (or set) all the bits in the signal set.
       Alternatively, it would be reasonable to initialize part of the
       structure, such as a version field, to permit binary-compatibility
       between releases where the size of the set varies. For such reasons,
       either _s_i_g_e_m_p_t_y_s_e_t() or _s_i_g_f_i_l_l_s_e_t() must be called prior to any other
       use of the signal set, even if such use is read-only (for example, as
       an argument to _s_i_g_p_e_n_d_i_n_g()).  This function is not intended for
       dynamic allocation.

       The _s_i_g_f_i_l_l_s_e_t() and _s_i_g_e_m_p_t_y_s_e_t() functions require that the resulting
       signal set include (or exclude) all the signals defined in this volume
       of POSIX.1-2017. Although it is outside the scope of this volume of
       POSIX.1-2017 to place this requirement on signals that are implemented
       as extensions, it is recommended that implementation-defined signals
       also be affected by these functions. However, there may be a good
       reason for a particular signal not to be affected. For example,
       blocking or ignoring an implementation-defined signal may have
       undesirable side-effects, whereas the default action for that signal is
       harmless. In such a case, it would be preferable for such a signal to
       be excluded from the signal set returned by _s_i_g_f_i_l_l_s_e_t().

       In early proposals there was no distinction between invalid and
       unsupported signals (the names of optional signals that were not
       supported by an implementation were not defined by that
       implementation). The [[EEIINNVVAALL]] error was thus specified as a required
       error for invalid signals. With that distinction, it is not necessary
       to require implementations of these functions to determine whether an
       optional signal is actually supported, as that could have a significant
       performance impact for little value. The error could have been required
       for invalid signals and optional for unsupported signals, but this
       seemed unnecessarily complex. Thus, the error is optional in both
       cases.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _S_e_c_t_i_o_n _2_._4, _S_i_g_n_a_l _C_o_n_c_e_p_t_s, _p_t_h_r_e_a_d___s_i_g_m_a_s_k(), _s_i_g_a_c_t_i_o_n(),
       _s_i_g_a_d_d_s_e_t(), _s_i_g_d_e_l_s_e_t(), _s_i_g_f_i_l_l_s_e_t(), _s_i_g_i_s_m_e_m_b_e_r(), _s_i_g_p_e_n_d_i_n_g(),
       _s_i_g_s_u_s_p_e_n_d()

       The Base Definitions volume of POSIX.1-2017, <<ssiiggnnaall..hh>>

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the
       Institute of Electrical and Electronics Engineers, Inc and The Open
       Group.  In the event of any discrepancy between this version and the
       original IEEE and The Open Group Standard, the original IEEE and The
       Open Group Standard is the referee document. The original Standard can
       be obtained online at http://www.opengroup.org/unix/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017                       SIGEMPTYSET(3)
