summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>2001-07-24 11:15:13 +0000
committersheldonh <sheldonh@FreeBSD.org>2001-07-24 11:15:13 +0000
commit1b8c225dc1ac21d35188a888a5786c95a353780f (patch)
tree3afab65b246c75abf8e313c2bed1795b6b0f2840 /lib
parent3f6937d34749096fb3bac7e81539ed37cae8c909 (diff)
downloadFreeBSD-src-1b8c225dc1ac21d35188a888a5786c95a353780f.zip
FreeBSD-src-1b8c225dc1ac21d35188a888a5786c95a353780f.tar.gz
The delta introduced in the previous revision and attributed to the
OpenBSD project had grammar problems and made no attempt to motivate the practice of saving errno. Replace it with something better.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/sigaction.26
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2
index 51bd2b9..1e508c8 100644
--- a/lib/libc/sys/sigaction.2
+++ b/lib/libc/sys/sigaction.2
@@ -437,10 +437,12 @@ functions when called from a signal handler is undefined.
In general though, signal handlers should do little more than set a
flag; most other actions are not safe.
.Pp
-As well, inside the signal handler it is also considered more safe to
-make a copy the global variable
+Also, it is good practice to make a copy of the global variable
.Va errno
and restore it before returning from the signal handler.
+This protects against the side effect of
+.Va errno
+being set by functions called from inside the signal handler.
.Sh RETURN VALUES
A 0 value indicated that the call succeeded. A \-1 return value
indicates an error occurred and
OpenPOWER on IntegriCloud