Hi,
I am having some
problem in using linux signals with Pth threads.
This is what I have
done
1. >From the main
(), I have done a pth_init ().
2. Spawned two
threads from the main(). These two threads just runs in a while loop with a
small delay inside the while loop.
3. Registered a
signal handler for SIGUSR1 signal from main(). I am using sigaction() system
call for registering the signal handler.
4. main() does a
pth_join() on the child thread ids.
Now from the signal
handler for SIGUSR1 I am trying to acquire a mutex using the pth_mutex_acquire()
call.
Whenever the signal
handler is executed, the program crashes at the pth_mutex_acquire() call.
Does anyone have any
idea about why it is crashing while trying to acquire a mutex from a signal
handler ?
Thanks and Regards,
Vinu
V
----------------------------------------------------------------------------------------------------------------------------- Disclaimer -----------------------------------------------------------------------------------------------------------------------------
"This message(including attachment if any)is confidential and may be privileged.Before opening attachments please check them for viruses and defects.MindTree Consulting Private Limited (MindTree)will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside.If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission." -----------------------------------------------------------------------------------------------------------------------------