mirror of
git://sourceware.org/git/glibc.git
synced 2025-02-17 13:00:43 +08:00
(__sigwait): The return value semantics for sigtimedwait is different. Rework the return value handling and don't pass in an siginfo variable.
This commit is contained in:
parent
28b48696d1
commit
8a815198bf
@ -36,15 +36,20 @@ __sigwait (set, sig)
|
|||||||
const sigset_t *set;
|
const sigset_t *set;
|
||||||
int *sig;
|
int *sig;
|
||||||
{
|
{
|
||||||
siginfo_t info;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* XXX The size argument hopefully will have to be changed to the
|
/* XXX The size argument hopefully will have to be changed to the
|
||||||
real size of the user-level sigset_t. */
|
real size of the user-level sigset_t. */
|
||||||
|
/* XXX INLINE_SYSCALL_NOERROR candiate. */
|
||||||
ret = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
ret = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
|
||||||
CHECK_1 (&info), NULL, _NSIG / 8);
|
NULL, NULL, _NSIG / 8);
|
||||||
if (ret == 0)
|
if (ret != -1)
|
||||||
*sig = info.si_signo;
|
{
|
||||||
|
*sig = ret;
|
||||||
|
ret = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ret = errno;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user