[lkml]   [2002]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] user-vm-unlock-2.5.31-A2

On Thu, 15 Aug 2002, Linus Torvalds wrote:

> > we could skip the 'clear' bit if this is the last release of the mm.
> Ahhah, but you miss the point.
> The fork()'ed child may clone on its own, and then exit. [...]

i was actually thinking about exactly this scenario when suggesting this.
The fork()ed child might as well end up being a 'thread' that exits and
thus needs to clear up after itself, right?

> [...] In which case we sure as heck don't want the original child to
> modify the VM that it now shares with a subthread.

in what way is clone() utilized? if it's via any threading library then
the fork()-ed process has its own thread state, which must be freed when
exiting. So it's something like:

thread X
fork() ===============> thread Y
clone() ===========> thread Z

so we at this point have the original thread X, a new thread Y that was
created via the fork(), and thread Z. Thread Y and Z share the same V. If
now thread Y exits:


then we'd sure expect for Z's sake to free Y's thread state, right?
Otherwise there would be a resource leak.

[ but it's getting late here and i might miss something :) ]


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.076 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site