This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [PATCH] Fix nanosleep
On Tue, May 06, 2003 at 04:02:23PM +0200, Thomas Pfaff wrote:
>Christopher Faylor wrote:
>>I don't know what you're investigating but the basic problem with threads
>>and signals is that you can't send a signal to a thread. I never
>>implemented
>>that part of signal delivery.
>
>Indeed you are right:
>
>pthread_kill does not work as expected, instead of sending a signal to
>the specified thread all threads are woken up and the signal handler is
>not called in the context of that particular thread but in the context
>of the main thread. Since all threads are waiting for the same global
>signal_arrived and not for thread specific one it is clear that this
>does not work.
>
>And i would like to know why every thread has its own sigaction
>structure. AFAIK signals are global in the process and not thread
>specific, and only the delivery to a thread can be blocked via
>pthread_sigmask.
I assume it is just pure meanness as usual.
cgf