[lkml]   [1997]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Killing clones (threads)
Theodore Y. Ts'o wrote:
> What about high_bits = 0 means "all threads", and high_bits = 1 means
> the "root" thread, and the first cloned thread gets high_bits = 2?

Since POSIX requires that a signal sent to the process is delivered to
exactly (*) one thread, it would seem more natural to use 0 for this.
Of course one can always re-twist the bits in libc, but don't think a
"0 = all" rule would simplify the kernel significantly.

(*) I have the book at home, but I think "exactly" is the wording. Not
sure if they qualify the "nobody's listening before termination"
case properly.

Note that this "exactly one" thread is one of the threads who don't
block the signal, so it's more complex than a simple "kill process" =>
"kill thread 1" mapping.

- Werner

/ Werner Almesberger, DI-LRC,EPFL,CH /

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