SIGPWR not handled properly on a dual core pc

Hello,
I will try to describe the problem, I have a multithreaded
application that is running on a dual core computer. I have tries this test
with either dual core enabled or disabled. When I try to issue a SIGPWR
using slay command, the signal handler specified in the application does not
catch the signal, I know that because I have a slogf trace in the program.
The program does quit but not the way it is supposed to that is doing clean
up work specified in the signal handler code.

If I issue SIGPWR several times, eventually the program will quit, however,
signal handler is never called. I have set up the signal handler to handle
SIGPWR using signal() call and it does work for other signal threaded
program on the same computer. The code for single threaded and multithreaded
is pretty much the same except the multithreaded started additional threads.

Can someone please help me figure out this confusuing problem.

Thanks in advance,

Sabtain

“sabtain” <khansx@aecl.ca> wrote in message news:fqovha$9k4$1@inn.qnx.com

Hello,
I will try to describe the problem, I have a multithreaded
application that is running on a dual core computer. I have tries this
test with either dual core enabled or disabled. When I try to issue a
SIGPWR using slay command, the signal handler specified in the application
does not catch the signal, I know that because I have a slogf trace in the
program. The program does quit but not the way it is supposed to that is
doing clean up work specified in the signal handler code.

If I issue SIGPWR several times, eventually the program will quit,
however, signal handler is never called. I have set up the signal handler
to handle SIGPWR using signal() call and it does work for other signal
threaded program on the same computer. The code for single threaded and
multithreaded is pretty much the same except the multithreaded started
additional threads.

Can someone please help me figure out this confusuing problem.

Thanks in advance,

The signal may go to any of the thread. If you set a signal handler using
signal() in the first thread but it gets received by the second one that it
will not do what you “expect” it to do.

Either set the signal handler for every thread or I beleive you can mask the
signal(s) in all but one thread, never tried it myself.

Sabtain