aboutsummaryrefslogtreecommitdiffstats
path: root/man2/signal.2
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-03-17 17:08:01 +0100
committerAlejandro Colomar <alx@kernel.org>2023-03-30 15:14:55 +0200
commit4131356cdab8d37fc395ca5466a0401c8573380c (patch)
tree8c4c6f1c3172358b735b481cbbfdd9cc04b00ed9 /man2/signal.2
parentfd00f831b52d61a91d59cb3b46182869145d9700 (diff)
downloadman-pages-4131356cdab8.tar.gz
man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections
- Add a new HISTORY section that covers the history of an API, both regarding implementations and regarding old standards. This was previously covered in VERSIONS, and in some cases in STANDARDS. - Repurpose VERSIONS to cover differing implementations in _current_ systems. - STANDARDS is reduced to only cover current versions of standards. That basically means only C11 (C99 has been superseeded by C11; C17 is just a bugfix of C11, so not really a new version), and POSIX.1-2008 (*-2001 was superseeded by *-2008; *-2017 was just a bugfix for *-2008). The section also mentions for example 'Linux', 'GNU' or 'BSD' when a non-standard API is Linux- or GNU-only or if it's (de-facto) standard in the BSDs. - In some cases content that should go into one of these sections was in NOTES. Move it from there to where it corresponds. - In the SYNOPSIS, I added [[deprecated]] in some functions that I found are deprecated by the relevant standards. - A few other related changes... Cc: Oskari Pirhonen <xxc3ncoredxx@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man2/signal.2')
-rw-r--r--man2/signal.276
1 files changed, 39 insertions, 37 deletions
diff --git a/man2/signal.2 b/man2/signal.2
index d340c734b0..c05b0ee452 100644
--- a/man2/signal.2
+++ b/man2/signal.2
@@ -93,43 +93,7 @@ is set to indicate the error.
.B EINVAL
.I signum
is invalid.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C89, C99.
-.SH NOTES
-The effects of
-.BR signal ()
-in a multithreaded process are unspecified.
-.PP
-According to POSIX, the behavior of a process is undefined after it
-ignores a
-.BR SIGFPE ,
-.BR SIGILL ,
-or
-.B SIGSEGV
-signal that was not generated by
-.BR kill (2)
-or
-.BR raise (3).
-Integer division by zero has undefined result.
-On some architectures it will generate a
-.B SIGFPE
-signal.
-(Also dividing the most negative integer by \-1 may generate
-.BR SIGFPE .)
-Ignoring this signal might lead to an endless loop.
-.PP
-See
-.BR sigaction (2)
-for details on what happens when the disposition
-.B SIGCHLD
-is set to
-.BR SIG_IGN .
-.PP
-See
-.BR signal\-safety (7)
-for a list of the async-signal-safe functions that can be
-safely called from inside a signal handler.
-.PP
+.SH VERSIONS
The use of
.I sighandler_t
is a GNU extension, exposed if
@@ -173,6 +137,10 @@ POSIX.1 solved the portability mess by specifying
which provides explicit control of the semantics when a
signal handler is invoked; use that interface instead of
.BR signal ().
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.PP
In the original UNIX systems, when a handler that was established using
.BR signal ()
@@ -257,6 +225,40 @@ provides System\ V semantics.
.\" then
.\" .BR signal ()
.\" provides BSD semantics.
+.SH NOTES
+The effects of
+.BR signal ()
+in a multithreaded process are unspecified.
+.PP
+According to POSIX, the behavior of a process is undefined after it
+ignores a
+.BR SIGFPE ,
+.BR SIGILL ,
+or
+.B SIGSEGV
+signal that was not generated by
+.BR kill (2)
+or
+.BR raise (3).
+Integer division by zero has undefined result.
+On some architectures it will generate a
+.B SIGFPE
+signal.
+(Also dividing the most negative integer by \-1 may generate
+.BR SIGFPE .)
+Ignoring this signal might lead to an endless loop.
+.PP
+See
+.BR sigaction (2)
+for details on what happens when the disposition
+.B SIGCHLD
+is set to
+.BR SIG_IGN .
+.PP
+See
+.BR signal\-safety (7)
+for a list of the async-signal-safe functions that can be
+safely called from inside a signal handler.
.SH SEE ALSO
.BR kill (1),
.BR alarm (2),