diff options
author | des <des@FreeBSD.org> | 2001-03-11 18:52:10 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2001-03-11 18:52:10 +0000 |
commit | 7d30f45397473d1053fa15776cd66bd3de59ca69 (patch) | |
tree | dd25b2d49d6b17af36319a16c2e9d9c193221538 /sys/i386/linux | |
parent | 1fa96ee9e34f143d25f182282d5d911c0b3c7359 (diff) | |
download | FreeBSD-src-7d30f45397473d1053fa15776cd66bd3de59ca69.zip FreeBSD-src-7d30f45397473d1053fa15776cd66bd3de59ca69.tar.gz |
rfork() masks RFSTOPPED out of the flags it passes to fork1(), so we have
to call fork1() directly if we don't want out process queued right away.
This has the serendipitous side effect of saving us a call to pfind().
This makes threaded Linux apps (such as Opera) work again.
Diffstat (limited to 'sys/i386/linux')
-rw-r--r-- | sys/i386/linux/linux_machdep.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index 6c1ddee..aaa5cac 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -222,7 +222,6 @@ linux_clone(struct proc *p, struct linux_clone_args *args) struct proc *p2; int exit_signal; vm_offset_t start; - struct rfork_args rf_args; #ifdef DEBUG if (ldebug(clone)) { @@ -256,14 +255,9 @@ linux_clone(struct proc *p, struct linux_clone_args *args) error = 0; start = 0; - rf_args.flags = ff; - if ((error = rfork(p, &rf_args)) != 0) + if ((error = fork1(p, ff, &p2)) != 0) return (error); - p2 = pfind(p->p_retval[0]); - if (p2 == NULL) - return (ESRCH); - PROC_LOCK(p2); p2->p_sigparent = exit_signal; PROC_UNLOCK(p2); @@ -283,6 +277,8 @@ linux_clone(struct proc *p, struct linux_clone_args *args) setrunqueue(p2); mtx_unlock_spin(&sched_lock); + p->p_retval[0] = p2->p_pid; + p->p_retval[1] = 0; return (0); } |