All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Roland McGrath <roland@redhat.com>,
	Andreas Schwab <schwab@suse.de>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: zombie with CLONE_THREAD
Date: Thu, 1 Jul 2004 18:23:28 +0200	[thread overview]
Message-ID: <20040701162328.GK15086@dualathlon.random> (raw)
In-Reply-To: <Pine.LNX.4.58.0407010843450.11212@ppc970.osdl.org>

On Thu, Jul 01, 2004 at 08:49:10AM -0700, Linus Torvalds wrote:
> 
> 
> On Thu, 1 Jul 2004, Roland McGrath wrote:
> > 
> > > .. since this information should be available anyway (we'll have woken up 
> > > the tracer, and the tracer will see that the child is gone by simply 
> > > seeing the ESRCH errorcode from ptrace).
> > 
> > When did you wake up the tracer?  I don't see how that happened.
> 
> exit_notify() will inform the tracer:
> 
>         if (tsk->exit_signal != -1 && thread_group_empty(tsk)) {
>                 int signal = tsk->parent == tsk->real_parent ? tsk->exit_signal : SIGCHLD;
>                 do_notify_parent(tsk, signal);
>         } else if (tsk->ptrace) {
> ***             do_notify_parent(tsk, SIGCHLD);   *****
>         }
> 
> so this should catch it. It even gets the pid of the child in the siginfo 
> structure if it really wants to see that..

it will get the wakeup, but that doesn't mean wait4 will return if
it's waiting for all childs. Now I don't know but with strace it may
even be ok by luck, but it certainly changes the semantics of
wait4/ptrace at least a little and I could remotely imagine if somebody
wants a wait4 to return when a ptraced child exited, if there are other
"regular" children. That's why I admitted it can be considered a feature
and not a completely worthless effort to leave self-reaping tasks as
zombies if they're ptraced.

  reply	other threads:[~2004-07-01 16:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-30  6:00 zombie with CLONE_THREAD Andrea Arcangeli
2004-06-30  6:08 ` Andrew Morton
2004-06-30  7:14   ` Roland McGrath
2004-06-30  9:04     ` Andreas Schwab
2004-07-01  3:22       ` Roland McGrath
2004-07-01  4:08         ` Andrea Arcangeli
2004-07-01  4:42           ` Linus Torvalds
2004-07-01  5:39           ` Roland McGrath
2004-07-01  5:56             ` Linus Torvalds
2004-07-01  7:06               ` Roland McGrath
2004-07-01 14:26                 ` Andrea Arcangeli
2004-07-01 21:33                   ` Roland McGrath
2004-07-01 15:49                 ` Linus Torvalds
2004-07-01 16:23                   ` Andrea Arcangeli [this message]
2004-07-01 16:43                     ` Linus Torvalds
2004-07-01 20:27                   ` Roland McGrath
2004-07-01  4:57         ` Linus Torvalds
2004-07-01  7:02           ` Roland McGrath
2004-07-01 16:50             ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040701162328.GK15086@dualathlon.random \
    --to=andrea@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.com \
    --cc=schwab@suse.de \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.