aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSheldon Hearn <sheldonh@FreeBSD.org>2001-07-24 11:15:13 +0000
committerSheldon Hearn <sheldonh@FreeBSD.org>2001-07-24 11:15:13 +0000
commitb2b50712a6520c00a117f4609564cffcd33f48ba (patch)
tree3afab65b246c75abf8e313c2bed1795b6b0f2840 /lib
parent30b07250714ae508b037bc6a1fb0b027aa8f4f36 (diff)
Notes
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 51bd2b9f684cb..1e508c8d16fd3 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