about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sigprocmask.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/sigprocmask.c')
-rw-r--r--sysdeps/unix/sysv/linux/sigprocmask.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sigprocmask.c b/sysdeps/unix/sysv/linux/sigprocmask.c
index 476f46a8e6..064179e2b8 100644
--- a/sysdeps/unix/sysv/linux/sigprocmask.c
+++ b/sysdeps/unix/sysv/linux/sigprocmask.c
@@ -41,11 +41,13 @@ __sigprocmask (how, set, oset)
     {
       /* XXX The size argument hopefully will have to be changed to the
 	 real size of the user-level sigset_t.  */
+      int saved_errno = errno;
       int result = __syscall_rt_sigprocmask (how, set, oset, _NSIG / 8);
 
       if (result >= 0 || errno != ENOSYS)
 	return result;
 
+      __set_errno (saved_errno);
       __libc_missing_rt_sigs = 1;
     }