From owner-freebsd-emulation@FreeBSD.ORG Wed Feb 18 14:10:05 2009 Return-Path: Delivered-To: freebsd-emulation@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BFDE106566B for ; Wed, 18 Feb 2009 14:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3E7008FC1A for ; Wed, 18 Feb 2009 14:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n1IEA5aM060808 for ; Wed, 18 Feb 2009 14:10:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n1IEA5Vq060807; Wed, 18 Feb 2009 14:10:05 GMT (envelope-from gnats) Date: Wed, 18 Feb 2009 14:10:05 GMT Message-Id: <200902181410.n1IEA5Vq060807@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: Takahiro Kurosawa Cc: Subject: Re: kern/131506: pipes in forked procs sometimes hang under Linux emulation 2.6.16 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Takahiro Kurosawa List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2009 14:10:05 -0000 The following reply was made to PR kern/131506; it has been noted by GNATS. From: Takahiro Kurosawa To: Kostik Belousov Cc: bug-followup@freebsd.org Subject: Re: kern/131506: pipes in forked procs sometimes hang under Linux emulation 2.6.16 Date: Wed, 18 Feb 2009 23:08:05 +0900 2009/2/18 Kostik Belousov : > Please, resend the patch without base64-encoding, best as a plain/text > attachment. Sure. Sending the patch inline... The attachment of my previous mail looks broken to me too. === sys/amd64/linux32/linux32_machdep.c ================================================================== --- sys/amd64/linux32/linux32_machdep.c (revision 188741) +++ sys/amd64/linux32/linux32_machdep.c (local) @@ -560,7 +560,7 @@ /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); return (0); @@ -749,7 +749,7 @@ /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); } === sys/i386/linux/linux_machdep.c ================================================================== --- sys/i386/linux/linux_machdep.c (revision 188741) +++ sys/i386/linux/linux_machdep.c (local) @@ -376,7 +376,7 @@ /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); return (0); @@ -581,7 +581,7 @@ /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); }