From owner-freebsd-emulation Thu Sep 5 14: 7:29 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C5BC37B400 for ; Thu, 5 Sep 2002 14:07:28 -0700 (PDT) Received: from Daffy.timing.com (daffy.timing.com [206.168.13.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6D3143E3B for ; Thu, 5 Sep 2002 14:07:27 -0700 (PDT) (envelope-from jhein@timing.com) Received: from brain.timing.com (brain.timing.com [206.168.13.195]) by Daffy.timing.com (8.11.3/8.11.3) with ESMTP id g85L7OK70129; Thu, 5 Sep 2002 15:07:24 -0600 (MDT) (envelope-from jhein@timing.com) Received: from brain.timing.com (localhost [127.0.0.1]) by brain.timing.com (8.12.2/8.12.2) with ESMTP id g85L7Ncq072098; Thu, 5 Sep 2002 15:07:23 -0600 (MDT) (envelope-from jhein@brain.timing.com) Received: (from jhein@localhost) by brain.timing.com (8.12.2/8.12.2/Submit) id g85L7NMf072095; Thu, 5 Sep 2002 15:07:23 -0600 (MDT) (envelope-from jhein) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15735.51083.489854.267762@brain.timing.com> Date: Thu, 5 Sep 2002 15:07:23 -0600 From: John E Hein To: Duncan Barclay Cc: emulation@FreeBSD.ORG Subject: fix for Linux matlab exit behaviour - problem with linux_clone(2 In-Reply-To: References: X-Mailer: VM 7.03 under Emacs 21.1.1 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Duncan Barclay wrote at 21:55 +0100 on Sep 5: > Please review the following PR for a hack to let matlab exit. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=42457 > > The code in PR is deliberatly not a patch because it is not the right way > to cleanly fix the problem. > > The problem is that we do not fully emulate all of linux_clone(2) behaviour, > in particular, linux_clone(2) allows a thread to not send a signal to > its parent on exit. /sys/kern_exit.c does not allow this and will > send a specified signal or SIGCHLD. Matlab has a SIGCHLD handler that > does not reap threads. If the SIGCHLD is not sent, matlab reaps its last > thread and exits cleanly. Interesting... so why then does the /dev/ptmx -> /dev/null hack allow us to exit matlab? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message