mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Use PTHREAD_SCOPE_SYSTEM to decide what should be done.
This commit is contained in:
parent
fcf4e3a168
commit
2dad2d6bfc
2 changed files with 4 additions and 6 deletions
|
|
@ -40,17 +40,16 @@ int
|
|||
_execve(const char *name, char *const *argv, char *const *envp)
|
||||
{
|
||||
struct kse_execve_args args;
|
||||
struct pthread *curthread;
|
||||
struct pthread *curthread = _get_curthread();
|
||||
int ret;
|
||||
|
||||
if (!_kse_isthreaded())
|
||||
if (curthread->attr.flags & PTHREAD_SCOPE_SYSTEM)
|
||||
ret = __sys_execve(name, argv, envp);
|
||||
else {
|
||||
/*
|
||||
* When exec'ing, set the kernel signal mask to the thread's
|
||||
* signal mask to satisfy POSIX requirements.
|
||||
*/
|
||||
curthread = _get_curthread();
|
||||
args.sigmask = curthread->sigmask;
|
||||
args.sigpend = curthread->sigpend;
|
||||
args.path = (char *)name;
|
||||
|
|
|
|||
|
|
@ -40,17 +40,16 @@ int
|
|||
_execve(const char *name, char *const *argv, char *const *envp)
|
||||
{
|
||||
struct kse_execve_args args;
|
||||
struct pthread *curthread;
|
||||
struct pthread *curthread = _get_curthread();
|
||||
int ret;
|
||||
|
||||
if (!_kse_isthreaded())
|
||||
if (curthread->attr.flags & PTHREAD_SCOPE_SYSTEM)
|
||||
ret = __sys_execve(name, argv, envp);
|
||||
else {
|
||||
/*
|
||||
* When exec'ing, set the kernel signal mask to the thread's
|
||||
* signal mask to satisfy POSIX requirements.
|
||||
*/
|
||||
curthread = _get_curthread();
|
||||
args.sigmask = curthread->sigmask;
|
||||
args.sigpend = curthread->sigpend;
|
||||
args.path = (char *)name;
|
||||
|
|
|
|||
Loading…
Reference in a new issue