Re: Killing clones (threads)

Werner Almesberger (almesber@lrc.di.epfl.ch)
Thu, 14 Aug 1997 16:32:14 +0200 (MET DST)


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   werner.almesberger@lrc.di.epfl.ch /
/_IN_R_133__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/