From 51e253133a87a72cfde9ce6bd8c12544b54721cb Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 7 Apr 2023 01:17:04 +0000 Subject: Add selfpipe_fd(), refactor selfpipe Signed-off-by: Laurent Bercot --- src/libstddjb/sig_restoreto.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libstddjb/sig_restoreto.c') 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 #include #include 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 ; } -- cgit v1.2.3