Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Sep 2002 23:05:36 +0100 (BST)
From:      Duncan Barclay <dmlb@dmlb.org>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        emulation@FreeBSD.org
Subject:   Re: TIOCSCTTY not implemented in linuxulator?
Message-ID:  <XFMail.20020905230536.dmlb@computer.my.domain>
In-Reply-To: <20020905211340.GA705@athlon.pn.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020905230536.dmlb>