Date: Fri, 28 Jul 2006 11:09:18 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 102642 for review Message-ID: <200607281109.k6SB9Ihc019260@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102642 Change 102642 by rdivacky@rdivacky_witten on 2006/07/28 11:08:20 Fix the linux_getppid() to not panic immediately. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#5 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#5 (text+ko) ==== @@ -1330,8 +1330,6 @@ * linux_getuid() - MP SAFE */ -/* XXX: getppid must be changed too */ - int linux_getpid(struct thread *td, struct linux_getpid_args *args) { @@ -1382,20 +1380,20 @@ PROC_LOCK(pp); PROC_UNLOCK(p); - em = em_find(pp->p_pid, EMUL_UNLOCKED); - - if (em == NULL) { + /* if its also linux process */ + if (pp->p_sysent == &elf_linux_sysvec) { + em = em_find(pp->p_pid, EMUL_LOCKED); + if (em == NULL) { + printf("this happens!\n"); #ifdef DEBUG - printf(LMSG("emuldata not found.\n")); + printf(LMSG("emuldata not found.\n")); #endif - EMUL_RUNLOCK(&emul_lock); - return (0); - } - - /* if its also linux process */ - if (pp->p_sysent == &elf_linux_sysvec) + PROC_UNLOCK(pp); + EMUL_RUNLOCK(&emul_lock); + return (0); + } td->td_retval[0] = em->shared->group_pid; - else + } else td->td_retval[0] = pp->p_pid; EMUL_RUNLOCK(&emul_lock);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607281109.k6SB9Ihc019260>