From owner-freebsd-emulation Thu Sep 5 13:56: 8 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 8846B37B400 for ; Thu, 5 Sep 2002 13:56:06 -0700 (PDT) Received: from dmlb.org (pc1-cmbg2-6-cust106.cam.cable.ntl.com [80.4.4.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 920A743E6E for ; Thu, 5 Sep 2002 13:56:05 -0700 (PDT) (envelope-from dmlb@dmlb.org) Received: from slave.my.domain ([192.168.200.39]) by dmlb.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 3.36 #1) id 17n3fR-000DX5-00; Thu, 05 Sep 2002 21:55:57 +0100 Received: from dmlb by slave.my.domain with local (Exim 3.36 #1) id 17n3fQ-0000Sr-00; Thu, 05 Sep 2002 21:55:56 +0100 Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 05 Sep 2002 21:55:56 +0100 (BST) From: Duncan Barclay To: Marcel Moolenaar Subject: fix for Linux matlab exit behaviour - problem with linux_clone(2 Cc: emulation@FreeBSD.org 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 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. This has been tested on 4.6-PRE, with Matlab Release 12.1. Duncan -- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@dmlb.org | the alcoholics, and the permanently stoned. dmlb@freebsd.org| Steven King To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message