Re: [BUG 2.4.6] PPID of a process is set to itself

Tachino Nobuhiro (tachino@open.nm.fujitsu.co.jp)
Tue, 17 Jul 2001 15:10:04 +0900


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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/