Despite whether threaded mode is turned on, always save thread's

signal mask.
This commit is contained in:
davidxu 2003-06-04 12:38:21 +00:00
parent 8ba6f05132
commit 35d309a617
2 changed files with 12 additions and 8 deletions

View File

@ -44,8 +44,10 @@ __weak_reference(_sigprocmask, sigprocmask);
int
_sigprocmask(int how, const sigset_t *set, sigset_t *oset)
{
if (_kse_isthreaded() != 0)
return (pthread_sigmask(how, set, oset));
else
return (__sys_sigprocmask(how, set, oset));
int ret;
ret = pthread_sigmask(how, set, oset);
if ((ret == 0) && (_kse_isthreaded() == 0))
ret = __sys_sigprocmask(how, set, oset);
return (ret);
}

View File

@ -44,8 +44,10 @@ __weak_reference(_sigprocmask, sigprocmask);
int
_sigprocmask(int how, const sigset_t *set, sigset_t *oset)
{
if (_kse_isthreaded() != 0)
return (pthread_sigmask(how, set, oset));
else
return (__sys_sigprocmask(how, set, oset));
int ret;
ret = pthread_sigmask(how, set, oset);
if ((ret == 0) && (_kse_isthreaded() == 0))
ret = __sys_sigprocmask(how, set, oset);
return (ret);
}