Re: CLONE_KILLVMCH flag proposal

Richard Gooch (rgooch@ras.ucalgary.ca)
Wed, 16 Feb 2000 06:38:02 +1100


Pavel Krauz writes:
> Hello
>
> I am trying to modify pthread library a way in which it would not
> need manager thread. It seems that it is pretty feasible with
> CLONE_PARENT but one thing is missing.
>
> If the main thread dies due to some fatal error other threads will live
> further. This problem is not easily solved without manager thread so
> kernel will have to help here.
>
> This is an proposal for CLONE_KILLVMCH. The process/thread that
> has this flag set will kill all its children that share the same VM
> (were created with CLONE_VM) when it dies.
> This way the main thread will clean threads when some fatal error
> or kill occurs that cannot be caught in user space.
> I think that this is the only obstacle to make pthread support without
> manager thread and thus solve performance problems with creating and
> managing threads.
>
> Any ideas are highly appreciated.
>
> Here goes the patch that implement CLONE_KILLVMCH. I think it is not
> perfect but consider something like this as addition to the kernel.

How about looking at prctl(2), which was added for just this purpose?

Regards,

Richard....
Old: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/