]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/sigvec.3
memusage.1, memusagestat.1, pldd.1, accept.2, adjtimex.2, arch_prctl.2, bdflush.2...
[thirdparty/man-pages.git] / man3 / sigvec.3
index 1c0bb6c122353c1271c71910985d90292359e6b2..6f23886f8583cfaaf692f2c1da26835668f2e97c 100644 (file)
@@ -1,6 +1,7 @@
 '\" t
-.\" Copyright (c) 2005 by Michael Kerrisk <mtk-manpages@gmx.net>
+.\" Copyright (c) 2005 by Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\" Since the Linux kernel and libraries are constantly changing, this
 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
 .\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
-.TH SIGVEC 3 2005-12-01 "Linux" "Linux Programmer's Manual"
+.TH SIGVEC 3 2016-10-08 "Linux" "Linux Programmer's Manual"
 .SH NAME
 sigvec, sigblock, sigsetmask, siggetmask, sigmask \- BSD signal API
 .SH SYNOPSIS
-.B #define _BSD_SOURCE
-.br
 .B #include <signal.h>
 .sp
-.BI "int sigvec(int " sig ", struct sigvec *" vec ", struct sigvec *" ovec );
+.BI "int sigvec(int " sig ", const struct sigvec *" vec ", struct sigvec *" ovec );
 .sp
 .BI "int sigmask(int " signum );
 .sp
@@ -35,13 +38,24 @@ sigvec, sigblock, sigsetmask, siggetmask, sigmask \- BSD signal API
 .BI "int sigsetmask(int " mask );
 .sp
 .B int siggetmask(void);
+.sp
+.in -4n
+Feature Test Macro Requirements for glibc (see
+.BR feature_test_macros (7)):
+.in
+.sp
+All functions shown above:
+    Since glibc 2.19:
+        _DEFAULT_SOURCE
+    Glibc 2.19 and earlier:
+        _BSD_SOURCE
 .SH DESCRIPTION
 These functions are provided in glibc as a compatibility interface
 for programs that make use of the historical BSD signal API.
 This API is obsolete: new applications should use the POSIX signal API
 .RB ( sigaction (2),
 .BR sigprocmask (2),
-etc.)
+etc.).
 
 The
 .BR sigvec ()
@@ -65,7 +79,7 @@ To obtain the current disposition of
 .I sig
 without changing it, specify NULL for
 .IR vec ,
-and a non-NULL pointer for
+and a non-null pointer for
 .IR ovec .
 
 The dispositions for
@@ -77,22 +91,24 @@ cannot be changed.
 The
 .I sigvec
 structure has the following form:
+.in +4n
 .nf
 
 struct sigvec {
-    void (*sv_handler)();  /* Signal disposition */
-    int    sv_mask;        /* Signals to be blocked in handler */
-    int    sv_flags;       /* Flags */
+    void (*sv_handler)(int); /* Signal disposition */
+    int    sv_mask;          /* Signals to be blocked in handler */
+    int    sv_flags;         /* Flags */
 };
 
 .fi
+.in
 The
 .I sv_handler
 field specifies the disposition of the signal, and is either:
-the address of a signal handler function; or
-.B SIG_DFL
+the address of a signal handler function;
+.BR SIG_DFL ,
 meaning the default disposition applies for the signal; or
-.B SIG_IGN
+.BR SIG_IGN ,
 meaning that the signal is ignored.
 
 If
@@ -102,7 +118,7 @@ specifies the address of a signal handler, then
 specifies a mask of signals that are to be blocked while
 the handler is executing.
 In addition, the signal for which the handler is invoked is
-also blocked by default.
+also blocked.
 Attempts to block
 .B SIGKILL
 or
@@ -120,7 +136,7 @@ This field may contain zero or more of the following flags:
 If the signal handler interrupts a blocking system call,
 then upon return from the handler the system call will not be restarted:
 instead it will fail with the error
-.IR EINTR .
+.BR EINTR .
 If this flag is not specified, then system calls are restarted
 by default.
 .TP
@@ -142,16 +158,16 @@ function; the POSIX replacement is
 .PP
 The
 .BR sigmask ()
-function constructs and returns a "signal mask" for
+macro constructs and returns a "signal mask" for
 .IR signum .
-For example, we can initialise the
+For example, we can initialize the
 .I vec.sv_mask
 field given to
 .BR sigvec ()
 using code such as the following:
 .nf
 
-    vec.sv_mask = sigmask(SIGQUIT) | sigpause(SIGABRT);
+    vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT);
                 /* Block SIGQUIT and SIGABRT during
                    handler execution */
 .fi
@@ -198,14 +214,37 @@ functions return the previous signal mask.
 
 The
 .BR sigmask ()
-function returns the signal mask for
+macro returns the signal mask for
 .IR signum .
 .SH ERRORS
 See the ERRORS under
 .BR sigaction (2)
 and
 .BR sigprocmask (2).
-.SH "CONFORMING TO"
+.SH VERSIONS
+Starting with version 2.21, the GNU C library no longer exports the
+.BR sigvec ()
+function as part of the ABI.
+(To ensure backward compatibility,
+the glibc symbol versioning scheme continues to export the interface
+to binaries linked against older versions of the library.)
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbw32 lb lb
+l l l.
+Interface      Attribute       Value
+T{
+.BR sigvec (),
+.BR sigmask (),
+.BR sigblock (),
+.BR sigsetmask (),
+.BR siggetmask ()
+T}     Thread safety   MT-Safe
+.TE
+.SH CONFORMING TO
 All of these functions were in
 4.3BSD, except
 .BR siggetmask (),
@@ -222,7 +261,7 @@ equal to 0).
 On System V,
 .BR signal ()
 provides unreliable semantics.
-POSIX.1-2001 leaves these aspects of
+POSIX.1 leaves these aspects of
 .BR signal ()
 unspecified.
 See
@@ -231,12 +270,12 @@ for further details.
 
 In order to wait for a signal,
 BSD and System V both provided a function named
-.BR sigpause (),
+.BR sigpause (3),
 but this function has a different argument on the two systems.
 See
 .BR sigpause (3)
 for details.
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR kill (2),
 .BR pause (2),
 .BR sigaction (2),
@@ -245,5 +284,4 @@ for details.
 .BR raise (3),
 .BR sigpause (3),
 .BR sigset (3),
-.BR feature_test_macros (7),
 .BR signal (7)