Date: Wed, 31 Jan 2007 16:17:00 +0100 From: Divacky Roman <xdivac02@stud.fit.vutbr.cz> To: xdivac02@stud.fit.vutbrcz, emulation@freebsd.org Subject: Re: The patch for 2.6.16 emulation Message-ID: <20070131151700.GA94000@stud.fit.vutbr.cz> In-Reply-To: <20070131123615.GA1895@mail.scottro.net> References: <20070131123615.GA1895@mail.scottro.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 31, 2007 at 07:36:15AM -0500, Scott Robbins wrote:
> I tried the patch for linux_emul.c last night.
>
> However, it didn't seem to change anything. Linux-opera still leaves a
> zombied process each time it's closed.
updated patch:
--- /tmp/tmp.1529.0 Wed Jan 31 16:16:13 2007
+++ /root/projects/linuxolator/src/sys/compat/linux/linux_emul.c Wed Jan 31 10:22:57 2007
@@ -165,6 +165,17 @@
KASSERT(em != NULL, ("proc_exit: emuldata not found.\n"));
+ /* reparent all non thread leaders to initproc */
+ if (em->shared->group_pid != p->p_pid) {
+ sx_xlock(&proctree_lock);
+ wakeup(initproc);
+ PROC_LOCK(p);
+ proc_reparent(p, initproc);
+ p->p_sigparent = SIGCHLD;
+ PROC_UNLOCK(p);
+ sx_xunlock(&proctree_lock);
+ }
+
child_clear_tid = em->child_clear_tid;
EMUL_UNLOCK(&emul_lock);
with this I dont have any zombie processes and world looks brighter ;)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070131151700.GA94000>
