From owner-freebsd-emulation Thu Sep 5 15:13: 6 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 5560D37B400 for ; Thu, 5 Sep 2002 15:13:04 -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 D709F43E42 for ; Thu, 5 Sep 2002 15:13:03 -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 17n4rv-000DZR-00; Thu, 05 Sep 2002 23:12:56 +0100 Received: from dmlb by slave.my.domain with local (Exim 3.36 #1) id 17n4rv-0000OU-00; Thu, 05 Sep 2002 23:12:55 +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: <15735.51083.489854.267762@brain.timing.com> Date: Thu, 05 Sep 2002 23:12:55 +0100 (BST) From: Duncan Barclay To: John E Hein Subject: Re: fix for Linux matlab exit behaviour - problem with linux_clo 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 On 05-Sep-2002 John E Hein wrote: > 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? > Hmm, I forgot about that hack. I have no idea! Can you get a ktrace of it exiting please, preferably after unsetting DISPLAY so that X11 is turned off. Turning X11 off means that there is less cruft in the ktrace. Otherwise, I'll take a look tomorrow. 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