summaryrefslogtreecommitdiff
path: root/src/libstddjb/sig_restoreto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/sig_restoreto.c')
-rw-r--r--src/libstddjb/sig_restoreto.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstddjb/sig_restoreto.c b/src/libstddjb/sig_restoreto.c
index 1a9250e..e40f75b 100644
--- a/src/libstddjb/sig_restoreto.c
+++ b/src/libstddjb/sig_restoreto.c
@@ -2,12 +2,14 @@
/* MT-unsafe */
+#include <errno.h>
#include <signal.h>
#include <skalibs/sig.h>
void sig_restoreto (sigset_t const *set, unsigned int n)
{
+ int e = errno ;
unsigned int i = 1 ;
for (; i < n ; i++)
{
@@ -15,4 +17,5 @@ void sig_restoreto (sigset_t const *set, unsigned int n)
if (h < 0) continue ;
if (h) sig_restore(i) ;
}
+ errno = e ;
}