]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/sigqueue.3
des_crypt.3: Minor wording fix in VERSIONS
[thirdparty/man-pages.git] / man3 / sigqueue.3
index 0c9d9338429b0d165bd319320ea30834defcc728..a375e4e0c2cc42c62685a5b735930d7031fe05f0 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (c) 2002 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.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" added note on self-signaling, aeb, 2002-06-07
 .\" added note on CAP_KILL, mtk, 2004-06-16
 .\"
-.TH SIGQUEUE 3 2012-03-25 "Linux" "Linux Programmer's Manual"
+.TH SIGQUEUE 3 2017-09-15 "Linux" "Linux Programmer's Manual"
 .SH NAME
 sigqueue \- queue a signal and data to a process
 .SH SYNOPSIS
 .B #include <signal.h>
-.sp
+.PP
 .BI "int sigqueue(pid_t " pid ", int " sig ", const union sigval " value );
-.sp
+.PP
 .in -4n
 Feature Test Macro Requirements for glibc (see
 .BR feature_test_macros (7)):
 .in
-.sp
+.PP
 .BR sigqueue ():
 _POSIX_C_SOURCE\ >=\ 199309L
 .SH DESCRIPTION
@@ -55,16 +57,16 @@ The
 .I value
 argument is used to specify an accompanying item of data (either an integer
 or a pointer value) to be sent with the signal, and has the following type:
-.sp
+.PP
 .in +4n
-.nf
+.EX
 union sigval {
     int   sival_int;
     void *sival_ptr;
 };
-.fi
+.EE
 .in
-
+.PP
 If the receiving process has installed a handler for this signal using the
 .B SA_SIGINFO
 flag to
@@ -78,12 +80,12 @@ Furthermore, the
 .I si_code
 field of that structure will be set to
 .BR SI_QUEUE .
-.SH "RETURN VALUE"
+.SH RETURN VALUE
 On success,
 .BR sigqueue ()
 returns 0, indicating that the signal was successfully
 queued to the receiving process.
-Otherwise \-1 is returned and
+Otherwise, \-1 is returned and
 .I errno
 is set to indicate the error.
 .SH ERRORS
@@ -108,9 +110,24 @@ For the required permissions, see
 No process has a PID matching
 .IR pid .
 .SH VERSIONS
-This system call first appeared in Linux 2.2.
-.SH "CONFORMING TO"
-POSIX.1-2001.
+.BR sigqueue ()
+and the underlying
+.BR rt_sigqueueinfo ()
+system call first appeared in Linux 2.2.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface      Attribute       Value
+T{
+.BR sigqueue ()
+T}     Thread safety   MT-Safe
+.TE
+.SH CONFORMING TO
+POSIX.1-2001, POSIX.1-2008.
 .SH NOTES
 If this function results in the sending of a signal to the process
 that invoked it, and that signal was not blocked by the calling thread,
@@ -119,8 +136,10 @@ having it unblocked, or by waiting for it using
 .BR sigwait (3)),
 then at least some signal must be delivered to this thread before this
 function returns.
-
-On Linux, this function is implemented using the
+.SS C library/kernel differences
+On Linux,
+.BR sigqueue ()
+is implemented using the
 .BR rt_sigqueueinfo (2)
 system call.
 The system call differs in its third argument, which is the
@@ -134,17 +153,17 @@ Inside the glibc
 wrapper, this argument,
 .IR uinfo ,
 is initialized as follows:
+.PP
 .in +4n
-.nf
-
-uinfo.si_signo = sig;      /* argument supplied to sigqueue() */
+.EX
+uinfo.si_signo = sig;      /* Argument supplied to sigqueue() */
 uinfo.si_code = SI_QUEUE;
 uinfo.si_pid = getpid();   /* Process ID of sender */
 uinfo.si_uid = getuid();   /* Real UID of sender */
-uinfo.si_value = val;      /* argument supplied to sigqueue() */
-.fi
+uinfo.si_value = val;      /* Argument supplied to sigqueue() */
+.EE
 .in
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR kill (2),
 .BR rt_sigqueueinfo (2),
 .BR sigaction (2),