summaryrefslogtreecommitdiffstats
path: root/man2/signalfd.2
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--man2/signalfd.234
1 files changed, 19 insertions, 15 deletions
diff --git a/man2/signalfd.2 b/man2/signalfd.2
index 9af22b0..fba622c 100644
--- a/man2/signalfd.2
+++ b/man2/signalfd.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH signalfd 2 2023-05-03 "Linux man-pages 6.05.01"
+.TH signalfd 2 2023-10-31 "Linux man-pages 6.7"
.SH NAME
signalfd \- create a file descriptor for accepting signals
.SH LIBRARY
@@ -12,7 +12,7 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <sys/signalfd.h>
-.PP
+.P
.BI "int signalfd(int " fd ", const sigset_t *" mask ", int " flags );
.fi
.SH DESCRIPTION
@@ -26,7 +26,7 @@ and has the advantage that the file descriptor may be monitored by
.BR poll (2),
and
.BR epoll (7).
-.PP
+.P
The
.I mask
argument specifies the set of signals that the caller
@@ -46,7 +46,7 @@ or
signals via a signalfd file descriptor;
these signals are silently ignored if specified in
.IR mask .
-.PP
+.P
If the
.I fd
argument is \-1,
@@ -60,7 +60,7 @@ is not \-1,
then it must specify a valid existing signalfd file descriptor, and
.I mask
is used to replace the signal set associated with that file descriptor.
-.PP
+.P
Starting with Linux 2.6.27, the following values may be bitwise ORed in
.I flags
to change the behavior of
@@ -85,11 +85,11 @@ See the description of the
flag in
.BR open (2)
for reasons why this may be useful.
-.PP
+.P
Up to Linux 2.6.26, the
.I flags
argument is unused, and must be specified as zero.
-.PP
+.P
.BR signalfd ()
returns a file descriptor that supports the following operations:
.TP
@@ -131,7 +131,11 @@ or fails with the error
.B EAGAIN
if the file descriptor has been made nonblocking.
.TP
-.BR poll "(2), " select "(2) (and similar)"
+.BR poll (2)
+.TQ
+.BR select (2)
+.TQ
+(and similar)
The file descriptor is readable
(the
.BR select (2)
@@ -161,7 +165,7 @@ The format of the
structure(s) returned by
.BR read (2)s
from a signalfd file descriptor is as follows:
-.PP
+.P
.in +4n
.EX
struct signalfd_siginfo {
@@ -192,7 +196,7 @@ struct signalfd_siginfo {
};
.EE
.in
-.PP
+.P
Each of the fields in this structure
is analogous to the similarly named field in the
.I siginfo_t
@@ -338,7 +342,7 @@ The glibc
.BR signalfd ()
wrapper function does not include this argument,
since it provides the required value for the underlying system call.
-.PP
+.P
There are two underlying Linux system calls:
.BR signalfd ()
and the more recent
@@ -379,7 +383,7 @@ If a signal appears in the
.I mask
of more than one of the file descriptors, then occurrences
of that signal can be read (once) from any one of the file descriptors.
-.PP
+.P
Attempts to include
.B SIGKILL
and
@@ -387,7 +391,7 @@ and
in
.I mask
are silently ignored.
-.PP
+.P
The signal mask employed by a signalfd file descriptor can be viewed
via the entry for the corresponding file descriptor in the process's
.IR /proc/ pid /fdinfo
@@ -405,7 +409,7 @@ or the
.B SIGFPE
signal that results from an arithmetic error.
Such signals can be caught only via signal handler.
-.PP
+.P
As described above,
in normal usage one blocks the signals that will be accepted via
.BR signalfd ().
@@ -443,7 +447,7 @@ The program terminates after accepting a
.B SIGQUIT
signal.
The following shell session demonstrates the use of the program:
-.PP
+.P
.in +4n
.EX
.RB "$" " ./signalfd_demo"