|
Home > Archive > Unix questions > April 2004 > Signal received by a process:
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Signal received by a process:
|
|
| Vivek Astvansh 2004-04-02, 4:38 am |
| Consider a UNIX process, that comprises of two POSIX threads: the
primary thread (related to main() function), and a secondary thread.
A signal is sent to the process. The question is: which thread
receives the signal?
thanks!
| |
| Paul Pluzhnikov 2004-04-02, 9:35 am |
| vivek_astvansh@yahoo.com (Vivek Astvansh) writes:
> Consider a UNIX process, that comprises of two POSIX threads: the
> primary thread (related to main() function), and a secondary thread.
>
> A signal is sent to the process. The question is: which thread
> receives the signal?
If the signal is "asynchronous" (e.g. SIGTERM, SIGHUP, etc.),
and neither thread blocks it, then either thread can receive it.
If the signal is "synchronous" (e.g. SIGSEGV) and was caused by an
illegal operation performed by one of the threads, it is sent to
that thread.
Note that this is one area where LinuxThreads are not
POSIX-compliant.
A more appropriate group for this question would have been
comp.programming.threads
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
|
|
|
|
|