[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-emulation
Subject:    Re: TIOCSCTTY not implemented in linuxulator?
From:       Duncan Barclay <dmlb () dmlb ! org>
Date:       2002-09-05 22:05:36
[Download RAW message or body]


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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic