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

signal mask.
This commit is contained in:
David Xu 2003-06-04 12:38:21 +00:00
parent c749b4f6dd
commit cd0a0c267b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115827
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);
}