From b2b50712a6520c00a117f4609564cffcd33f48ba Mon Sep 17 00:00:00 2001 From: Sheldon Hearn Date: Tue, 24 Jul 2001 11:15:13 +0000 Subject: [PATCH] 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. --- lib/libc/sys/sigaction.2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2 index 51bd2b9f684..1e508c8d16f 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