mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tachino Nobuhiro <tachino@open.nm.fujitsu.co.jp>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [BUG 2.4.6] PPID of a process is set to itself
Date: Tue, 17 Jul 2001 15:10:04 +0900	[thread overview]
Message-ID: <wv5813yb.wl@nisaaru.open.nm.fujitsu.co.jp> (raw)
In-Reply-To: <200107170441.f6H4fux15702@penguin.transmeta.com>
In-Reply-To: <k818gp7s.wl@nisaaru.open.nm.fujitsu.co.jp> <200107170441.f6H4fux15702@penguin.transmeta.com>


At Mon, 16 Jul 2001 21:41:56 -0700,
Linus Torvalds wrote:
> 
> HOWEVER, the bug you hit is because CLONE_THREAD also implies
> CLONE_PARENT, and the fork() code didn't actually enforce this. So
> instead of your patch, we just should not allow the parent and the child
> to be in the same thread group. Suggested real patch appended. Does this
> fix it for you too?

Thank you for the patch. 
I tried it and found the the process cloned by my test program became
the zombie child of my shell and is not reaped because the shell is
not expecting the process.

# ps lw
  F   UID   PID  PPID PRI  NI   VSZ  RSS WCHAN  STAT TTY        TIME COMMAND
000     0  1180  1176  14   0  3392 1640 wait4  S    pts/1      0:00 bash
144     0  1249  1180   9   0     0    0 do_exi Z    pts/1      0:00 [a.out <defunct>]
100     0  1279  1180  15   0  3272 1440 -      R    pts/1      0:00 ps lw


This is okay because when the shell is terminated, the child is also reaped,
but it seems a little strange.

  parent reply	other threads:[~2001-07-17  6:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-17  4:21 Tachino Nobuhiro
2001-07-17  4:41 ` Linus Torvalds
2001-07-17  6:10 ` Tachino Nobuhiro [this message]
2001-07-17  6:40   ` Linus Torvalds
2001-07-17  7:08     ` Ulrich Drepper
2001-07-17 23:13       ` huge number of context switches under 2.2.x with SMP & threaded apps bert hubert
2001-07-17 23:29         ` huge number of context switches under 2.2.x with SMP & threa Davide Libenzi

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=wv5813yb.wl@nisaaru.open.nm.fujitsu.co.jp \
    --to=tachino@open.nm.fujitsu.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®