From owner-freebsd-emulation Thu Sep 5 14:13:47 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 CDE8E37B401 for ; Thu, 5 Sep 2002 14:13:44 -0700 (PDT) Received: from kayak.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id F06F643E6E for ; Thu, 5 Sep 2002 14:13:43 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by kayak.xcllnt.net (8.11.6/8.11.4) with ESMTP id g85LDet61868; Thu, 5 Sep 2002 14:13:40 -0700 (PDT) (envelope-from marcel@kayak.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.6/8.12.6) with ESMTP id g85LDejr006659; Thu, 5 Sep 2002 14:13:40 -0700 (PDT) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.6/8.12.6/Submit) id g85LDewM006658; Thu, 5 Sep 2002 14:13:40 -0700 (PDT) Date: Thu, 5 Sep 2002 14:13:40 -0700 From: Marcel Moolenaar To: Duncan Barclay Cc: emulation@FreeBSD.org Subject: Re: TIOCSCTTY not implemented in linuxulator? Message-ID: <20020905211340.GA705@athlon.pn.xcllnt.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i 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 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. 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? -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message