SIGBUS in One Thread. Can Other Threads Continue?

SIGBUS in One Thread. Can Other Threads Continue?

Post by annamala » Sun, 09 Mar 2008 01:58:16


Hi All,

In a multi-threaded process, if one of the threads received the SIGBUS
signal, will the whole process exit or only the particular thread will
exit? Can other threads continue? We are working on Solaris 10.

Rgds,
anna
 
 
 

SIGBUS in One Thread. Can Other Threads Continue?

Post by ddunha » Sun, 09 Mar 2008 02:37:15


The whole. Signals are dealt with by individual threads, but their
action (nothing, process stop, process exit) must affect the entire
process.

From http://www.yqcomputer.com/ (good, even
though it refers to the old Solaris threading model where user threads
were separate from kernel threads).

User threads in Solaris, created via explicit calls to either
thr_create(3T) or pthread_create(3T), all have their own signal
masks. Threads can choose to block signals independent of other
threads executing in the same process, which allows different threads
to take delivery of different signals at various times during process
execution. The thread's libraries (POSIX and Solaris threads) provide
thr_sigsetmask(3T) and pthread_sigmask(3T) interfaces for
establishing per-user thread signal masks. The disposition and
handlers for all signals are shared by all the threads in a
process. So, for example, a SIGINT with the default disposition in
place will cause the entire process to exit.

Signals generated as a result of a trap (SIGFPE, SIGILL, etc) are
sent to the thread that caused the trap. Asynchronous signals are
delivered to the first thread that is found not blocking the signal.

--
Darren Dunham XXXX@XXXXX.COM
Senior Technical Consultant TAOS http://www.yqcomputer.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >