mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Call the __sys_sigprocmask(the system call) when sigprocmask()
is called and the application is not threaded. This works around a problem when an application that hasn't yet become threaded tries to jump out of a signal handler. Reported by: mbr Approved by: re@ (rwatson)
This commit is contained in:
parent
6445c6bdf1
commit
43dd76d242
2 changed files with 8 additions and 2 deletions
|
|
@ -44,5 +44,8 @@ __weak_reference(_sigprocmask, sigprocmask);
|
|||
int
|
||||
_sigprocmask(int how, const sigset_t *set, sigset_t *oset)
|
||||
{
|
||||
return (pthread_sigmask(how, set, oset));
|
||||
if (_kse_isthreaded() != 0)
|
||||
return (pthread_sigmask(how, set, oset));
|
||||
else
|
||||
return (__sys_sigprocmask(how, set, oset));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,5 +44,8 @@ __weak_reference(_sigprocmask, sigprocmask);
|
|||
int
|
||||
_sigprocmask(int how, const sigset_t *set, sigset_t *oset)
|
||||
{
|
||||
return (pthread_sigmask(how, set, oset));
|
||||
if (_kse_isthreaded() != 0)
|
||||
return (pthread_sigmask(how, set, oset));
|
||||
else
|
||||
return (__sys_sigprocmask(how, set, oset));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue