From owner-freebsd-emulation Thu Sep 5 15: 5:49 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 F410E37B400 for ; Thu, 5 Sep 2002 15:05:45 -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 3043043E42 for ; Thu, 5 Sep 2002 15:05:45 -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 17n4kr-000DZM-00; Thu, 05 Sep 2002 23:05:37 +0100 Received: from dmlb by slave.my.domain with local (Exim 3.36 #1) id 17n4kq-00008n-00; Thu, 05 Sep 2002 23:05:36 +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: <20020905211340.GA705@athlon.pn.xcllnt.net> Date: Thu, 05 Sep 2002 23:05:36 +0100 (BST) From: Duncan Barclay To: Marcel Moolenaar Subject: Re: TIOCSCTTY not implemented in linuxulator? 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 Marcel Moolenaar wrote: > On Thu, Sep 05, 2002 at 07:40:33PM +0100, Duncan Barclay wrote: > >> At this point ps shows >> PGID PID PPID WCHAN STAT TT TIME COMMAND >> 6255 6255 5319 wait I+ p1 0:00.93 >> /ide3.g/matlab6p1/bin/glnx86/matlab >> 6255 6404 6255 - Z+ p1 0:00.00 (matlab) >> and a kill -9 is needed. >> >> Should the wait4 by pid=6255 actually have the WCLONE option set? It is >> reaping a cloned process. Erm, sorry this turns out to be a red herring. Have a look at my later mail. We do not honour the Linux clone(2) signal handling options fully. Take a look at kern_exit lower down, where it signals the parent. > I don't think the option is required. Looking in /sys/kern/kern_exit.c > (-current sources) where we consume the options I see the following test: > > if ((p->p_sigparent != SIGCHLD) ^ > ((uap->options & WLINUXCLONE) != 0)) { > PROC_UNLOCK(p); > continue; > } > > For -stable sources this is (reformatted): > > if ((p->p_sigparent != SIGCHLD) ^ > ((uap->options & WLINUXCLONE) != 0)) > continue; > > The equivalent in the Linux kernel is (reformatted): > > if (((p->exit_signal != SIGCHLD) ^ > ((options & __WCLONE) != 0)) > && !(options & __WALL)) > continue; > > So, we have a __WALL that can make a difference and guess what we don't > promote in the Linuxulator? > > Can you put a printf() in linux_wait4() so that we can see if __WALL > (defined as 0x40000000) is present or not? We don't, I've already checked. However, this would not have made any difference to Matlab in this case. 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