diff options
author | davidxu <davidxu@FreeBSD.org> | 2004-10-07 14:23:15 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2004-10-07 14:23:15 +0000 |
commit | c4a10c9c779f2719a9c8d8c0f694066dfac53c7a (patch) | |
tree | d2906b35eb895c598b798c56b412f11bb4cbd18e /lib/libpthread | |
parent | ccb2845f238d279e9d789537a6359593811b4260 (diff) | |
download | FreeBSD-src-c4a10c9c779f2719a9c8d8c0f694066dfac53c7a.zip FreeBSD-src-c4a10c9c779f2719a9c8d8c0f694066dfac53c7a.tar.gz |
Use PTHREAD_SCOPE_SYSTEM to decide what should be done.
Diffstat (limited to 'lib/libpthread')
-rw-r--r-- | lib/libpthread/thread/thr_execve.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libpthread/thread/thr_execve.c b/lib/libpthread/thread/thr_execve.c index 2904a2f..ab1a9e98 100644 --- a/lib/libpthread/thread/thr_execve.c +++ b/lib/libpthread/thread/thr_execve.c @@ -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; |