summaryrefslogtreecommitdiffstats
path: root/lib/libkse
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2004-10-07 14:23:15 +0000
committerdavidxu <davidxu@FreeBSD.org>2004-10-07 14:23:15 +0000
commitc4a10c9c779f2719a9c8d8c0f694066dfac53c7a (patch)
treed2906b35eb895c598b798c56b412f11bb4cbd18e /lib/libkse
parentccb2845f238d279e9d789537a6359593811b4260 (diff)
downloadFreeBSD-src-c4a10c9c779f2719a9c8d8c0f694066dfac53c7a.zip
FreeBSD-src-c4a10c9c779f2719a9c8d8c0f694066dfac53c7a.tar.gz
Use PTHREAD_SCOPE_SYSTEM to decide what should be done.
Diffstat (limited to 'lib/libkse')
-rw-r--r--lib/libkse/thread/thr_execve.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libkse/thread/thr_execve.c b/lib/libkse/thread/thr_execve.c
index 2904a2f..ab1a9e98 100644
--- a/lib/libkse/thread/thr_execve.c
+++ b/lib/libkse/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;
OpenPOWER on IntegriCloud