From owner-p4-projects@FreeBSD.ORG Fri Nov 3 14:59:21 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 C8F2E16A47E; Fri, 3 Nov 2006 14:59:21 +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 9DB0916A47B for ; Fri, 3 Nov 2006 14:59:21 +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 860EC43D8D for ; Fri, 3 Nov 2006 14:59:18 +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 kA3ExI5Y003718 for ; Fri, 3 Nov 2006 14:59:18 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kA3ExIoA003715 for perforce@freebsd.org; Fri, 3 Nov 2006 14:59:18 GMT (envelope-from rdivacky@FreeBSD.org) Date: Fri, 3 Nov 2006 14:59:18 GMT Message-Id: <200611031459.kA3ExIoA003715@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 109125 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: Fri, 03 Nov 2006 14:59:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=109125 Change 109125 by rdivacky@rdivacky_witten on 2006/11/03 14:59:09 Pretend being a child of init in a case your parent based on em->shared->group_pid is not found. This is a temporary fix and better solution is on its way. Affected files ... .. //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#27 edit Differences ... ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#27 (text+ko) ==== @@ -1443,7 +1443,15 @@ /* find the group leader */ p = pfind(em->shared->group_pid); - KASSERT(p != NULL, ("getppid: parent process not found.\n")); + /* lets pretend we were reparented to init */ + if (p == NULL) { +#ifdef DEBUG + printf("getppid: thread group leader not found.\n"); +#endif + td->td_retval[0] = 1; + EMUL_UNLOCK(&emul_lock); + return (0); + } pp = p->p_pptr; /* switch to parent */ PROC_LOCK(pp);