This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix nanosleep


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.

Thomas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]