From owner-freebsd-emulation@FreeBSD.ORG Mon Feb 22 02:10:05 2010 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 6425E1065676 for ; Mon, 22 Feb 2010 02: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 432D08FC12 for ; Mon, 22 Feb 2010 02:10:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o1M2A4Bl036513 for ; Mon, 22 Feb 2010 02:10:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o1M2A46Y036512; Mon, 22 Feb 2010 02:10:04 GMT (envelope-from gnats) Date: Mon, 22 Feb 2010 02:10:04 GMT Message-Id: <201002220210.o1M2A46Y036512@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: Gleb Kurtsou Cc: Subject: Re: kern/141439: linux_exit_group kills group leader X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gleb Kurtsou List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2010 02:10:05 -0000 The following reply was made to PR kern/141439; it has been noted by GNATS. From: Gleb Kurtsou To: Stefan Schmidt Cc: bug-followup@FreeBSD.org Subject: Re: kern/141439: linux_exit_group kills group leader Date: Mon, 22 Feb 2010 04:06:59 +0200 On (13/12/2009 23:18), Stefan Schmidt wrote: [...] > Using the 32-bit Linux version of Sun's Java Development Kit 1.6 > (Update 17) on FreeBSD 8.0 (amd64), invocations of "javac" (or "java") > eventually end with the output of "Killed" and exit code 137. > > This is particularly annoying when running e.g. JUnit-tests in a > separate process. The calling process always receives exit code 137 > from its sub-process and assumes that tests failed. Hi Stefan, I've experienced the same problem with sun jdk. I think approach of not killing group leader is incorrect, it should also be killed. Your patch works because linux_exit_group is called for the second time when only group leader is available. Such behavior is not expected, control should not return to userspace from linux_exit_group. I've submitted another PR, it contains fixes for 2 linux exec bugs. I've followed NetBSD and patched exit1() to allow process exit status to be changed by event handlers. Would appreciate if you could test the patch: http://www.freebsd.org/cgi/query-pr.cgi?pr=144194 Thanks, Gleb