Fwd: Signals and an exiting thread

Justin Hibbits jrh29 at alumni.cwru.edu
Sat Oct 10 13:39:39 UTC 2009

I really need to change gmail to reply to all by default.

---------- Forwarded message ----------
From: Justin Hibbits <jrh29 at alumni.cwru.edu>
Date: Sat, Oct 10, 2009 at 9:38 AM
Subject: Re: Signals and an exiting thread
To: David Xu <davidxu at freebsd.org>

On Sat, Oct 10, 2009 at 1:25 AM, David Xu <davidxu at freebsd.org> wrote:

> Kostik Belousov wrote:
>  I agree that postponing assignment of the thread for signal delivery
>> till the actual delivery occurs is the proper fix. I tried to cheat
>> in my previous patch. Below is an experimental change that did very
>> minimal testing.
>> <snip>
> Even if the signal is put into process's signal queue, it is still
> possible that signal notification is lost because selected thread
> exits before seeing it, if other threads are sleeping, they are
> not notified, this leaves signal in process queue long time before
> it can be delivered to userland.

Unless they're in an uninterruptible sleep, wouldn't they be woken when the
signal is processed?  It might need work to give a second pass over the
threads after one dies, but I think that could be done when handling the
next task schedule.

- Justin

More information about the freebsd-current mailing list