vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Tue, May 6, 2008 at 6:46 AM, Ted Unangst <ted.unangst@gmail.com> wrote: > On 5/6/08, Philip Guenther <guenther@gmail.com> wrote: > > That's true of pthreads, but not of rthreads. Currently with > > rthreads, kill(getpid(),sig) will send the signal to the main thread, > > period. If the main thread has the signal blocked then it'll be left > > pending there, even if the current thread doesn't have it blocked. > > oops. I forget now if that was intentional or just implementation > fallout, but Mark's right, we should fix this in the kernel. The > library is the wrong place to workaround this. Yep. To quote myself: > There has to be some way to differentiate between > kill(getpid(), sig); > and > raise(sig); [in the original thread] > > in the kernel. There are two ways to do that: > 1) give the main thread an id distinct from that of the process, or > 2) use distinct system calls for pthread_kill() and kill(). > > The former has the advantage of being generic for any other cases > where there may be a pid vs thread-id distinction. The latter would > convey the intent of the call more clearly, perhaps simplifying the > checks in each case. What's your preference? Philip Guenther |
| Thread Tools | |
| Display Modes | |
| |