SIGINTERRUPT(3)            POSIX Programmer's Manual           SIGINTERRUPT(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
       siginterrupt -- allow signals to interrupt functions

SSYYNNOOPPSSIISS
       #include <signal.h>

       int siginterrupt(int _s_i_g, int _f_l_a_g);

DDEESSCCRRIIPPTTIIOONN
       The _s_i_g_i_n_t_e_r_r_u_p_t() function shall change the restart behavior when a
       function is interrupted by the specified signal. The function
       _s_i_g_i_n_t_e_r_r_u_p_t(_s_i_g, _f_l_a_g) has an effect as if implemented as:

           iinntt ssiiggiinntteerrrruupptt((iinntt ssiigg,, iinntt ffllaagg)) {{
               iinntt rreett;;
               ssttrruucctt ssiiggaaccttiioonn aacctt;;

               (void) sigaction(sig, NULL, &act);
               if (flag)
                   act.sa_flags &= ~SA_RESTART;
               else
                   act.sa_flags |= SA_RESTART;
               ret = sigaction(sig, &act, NULL);
               return ret;
           }

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

EERRRROORRSS
       The _s_i_g_i_n_t_e_r_r_u_p_t() function shall fail if:

       EEIINNVVAALL The _s_i_g argument is not a valid signal number.

       _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
       The _s_i_g_i_n_t_e_r_r_u_p_t() function supports programs written to historical
       system interfaces.  Applications should use the _s_i_g_a_c_t_i_o_n() with the
       SA_RESTART flag instead of the obsolescent _s_i_g_i_n_t_e_r_r_u_p_t() function.

RRAATTIIOONNAALLEE
       None.

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, _s_i_g_a_c_t_i_o_n()

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

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
       -- Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, Copyright (C) 2013 by the Institute of
       Electrical and Electronics Engineers, Inc and The Open Group.  (This is
       POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) 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.unix.org/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                  2013                      SIGINTERRUPT(3)
