Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 2002 14:13:40 -0700
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Duncan Barclay <dmlb@dmlb.org>
Cc:        emulation@FreeBSD.org
Subject:   Re: TIOCSCTTY not implemented in linuxulator?
Message-ID:  <20020905211340.GA705@athlon.pn.xcllnt.net>
In-Reply-To: <XFMail.20020905194033.dmlb@computer.my.domain>
References:  <XFMail.20020905174357.dmlb@computer.my.domain> <XFMail.20020905194033.dmlb@computer.my.domain>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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