Hmm. Sounds otherwise good, but I think POSIX threads require that
signals be sent to exactly one thread, and it should be one whose
sigmask permits it. Could this be feasibly emulated in user space?
Or how about CLONE_SIG (or similiar)? If signals would be set not to be
distributed to all threads, signals to processes with high bits zero
would be sent to the first thread (therefore _not_ giving the first
thread special treatment with respect to signals), or even better; some
thread with the same low bits and a sigmask to allow the signal (though
this latter part could be emulated in user space; YMMV on where it
should really be).
(Actually, I sent a suggestion to Xavier Leroy to emulate the POSIX
behaviour by having dummy signal handlers in each thread to intercept
incoming signals and send them to other threads if the one that
originally got them didn't want to handle it. Dirty, but at least it
should work. Whether it's worth it or not depends on when better kernel
support arrives...)
> My personal favourite for /proc would be that any CLONE_PID threads would
> show up _inside_ the original parent (that's kind of the basic idea with
Seems the most reasonable option to me, too.
-- Mikko Rauhala, reservin sivari - mjr@iki.fi - http://www.iki.fi/mjr/