Date: Sat, 14 Oct 2006 14:16:33 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 107886 for review Message-ID: <200610141416.k9EEGXoa019495@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=107886 Change 107886 by rdivacky@rdivacky_witten on 2006/10/14 14:16:03 Send the pdeath_signal only if parent is exiting. Previously we were sending it for any proc_reparent() call. Affected files ... .. //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#6 edit .. //depot/projects/linuxolator/src/sys/kern/kern_exit.c#4 edit Differences ... ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#6 (text+ko) ==== @@ -310,7 +310,11 @@ if (__predict_true(p->p_sysent != &elf_linux_sysvec)) return; - em = em_find(p, EMUL_UNLOCKED); - psignal(p, em->pdeath_signal); - EMUL_UNLOCK(&emul_lock); + /* do this only if the parent is exiting */ + if (p->p_pptr->p_flags & P_WEXIT) { + em = em_find(p, EMUL_UNLOCKED); + if (em->pdeath_signal != 0) + psignal(p, em->pdeath_signal); + EMUL_UNLOCK(&emul_lock); + } } ==== //depot/projects/linuxolator/src/sys/kern/kern_exit.c#4 (text+ko) ==== @@ -897,8 +897,10 @@ if (child->p_pptr == parent) return; + /* we want to have old parent accessible via p_pptr */ + EVENTHANDLER_INVOKE(reparent, child); + LIST_REMOVE(child, p_sibling); LIST_INSERT_HEAD(&parent->p_children, child, p_sibling); child->p_pptr = parent; - EVENTHANDLER_INVOKE(reparent, child); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610141416.k9EEGXoa019495>