about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sigsuspend.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/sigsuspend.c')
-rw-r--r--sysdeps/unix/sysv/linux/sigsuspend.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sigsuspend.c b/sysdeps/unix/sysv/linux/sigsuspend.c
index 197015401d..a5d2eb0ad7 100644
--- a/sysdeps/unix/sysv/linux/sigsuspend.c
+++ b/sysdeps/unix/sysv/linux/sigsuspend.c
@@ -40,11 +40,13 @@ __sigsuspend (set)
     {
       /* 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_sigsuspend (set, _NSIG / 8);
 
       if (result >= 0 || errno != ENOSYS)
 	return result;
 
+      __set_errno (saved_errno);
       __libc_missing_rt_sigs = 1;
     }