From owner-p4-projects@FreeBSD.ORG Sat Oct 14 14:16:58 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 09A8216A4A0; Sat, 14 Oct 2006 14:16:58 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D638916A492 for ; Sat, 14 Oct 2006 14:16:57 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66F7A43D53 for ; Sat, 14 Oct 2006 14:16:36 +0000 (GMT) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k9EEGXwL019498 for ; Sat, 14 Oct 2006 14:16:33 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k9EEGXoa019495 for perforce@freebsd.org; Sat, 14 Oct 2006 14:16:33 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sat, 14 Oct 2006 14:16:33 GMT Message-Id: <200610141416.k9EEGXoa019495@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 107886 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Oct 2006 14:16:58 -0000 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); }