Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Nov 2006 14:59:18 GMT
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 109125 for review
Message-ID:  <200611031459.kA3ExIoA003715@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611031459.kA3ExIoA003715>