Signals and an exiting thread

Justin Teller justin.teller at gmail.com
Fri Oct 2 22:57:31 UTC 2009


On Fri, Oct 2, 2009 at 3:31 PM, Jilles Tjoelker <jilles at stack.nl> wrote:
> On Fri, Oct 02, 2009 at 03:08:17PM -0700, Justin Teller wrote:
>> However, we did a little more investigation, and the SIGKILL example
>> Jilles posted happens as well.  We post a SIGKILL to a thread, and the
>> thread goes away before it can kill the process.
>
> If you mean pthread_kill() with "posting to a thread", then that does
> not seem a bug. I expect that pthread_kill() signals are lost when a
> thread exits and that pthread_kill() to a thread that has already
> terminated but has not yet been joined does nothing (possibly returning
> an error).
>
> If a SIGKILL from kill() is lost, that is a bug.
>
> --
> Jilles Tjoelker
>

It is a SIGKILL from kill().  I'll look at code and see if I can come
up with a good patch to fix it.

-Justin


More information about the freebsd-current mailing list