about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-09-29 22:02:28 +0000
committerUlrich Drepper <drepper@redhat.com>2002-09-29 22:02:28 +0000
commit8a815198bf935092191c4150dd65749af2b5db89 (patch)
treeb5591b269b360ecc542f55ffa9aad511df10f771 /sysdeps
parent28b48696d14a8b4a4203011b26d8add3db087870 (diff)
downloadglibc-8a815198bf935092191c4150dd65749af2b5db89.tar.gz
glibc-8a815198bf935092191c4150dd65749af2b5db89.tar.xz
glibc-8a815198bf935092191c4150dd65749af2b5db89.zip
(__sigwait): The return value semantics for sigtimedwait is different. Rework the return value handling and don't pass in an siginfo variable.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/sigwait.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/sigwait.c b/sysdeps/unix/sysv/linux/sigwait.c
index 522359e1da..39cc3e9750 100644
--- a/sysdeps/unix/sysv/linux/sigwait.c
+++ b/sysdeps/unix/sysv/linux/sigwait.c
@@ -36,15 +36,20 @@ __sigwait (set, sig)
      const sigset_t *set;
      int *sig;
 {
-  siginfo_t info;
   int ret;
 
   /* XXX The size argument hopefully will have to be changed to the
      real size of the user-level sigset_t.  */
+  /* XXX INLINE_SYSCALL_NOERROR candiate.  */
   ret =  INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
-			 CHECK_1 (&info), NULL, _NSIG / 8);
-  if (ret == 0)
-    *sig = info.si_signo;
+			 NULL, NULL, _NSIG / 8);
+  if (ret != -1)
+    {
+      *sig = ret;
+      ret = 0;
+    }
+  else
+    ret = errno;
 
   return ret;
 }