Welcome to the new Woodmann RCE Messageboards Regroupment
Please be patient while the rest of the site is restored.

To all Members of the old RCE Forums:
In order to log in, it will be necessary to reset your forum login password ("I forgot my password") using the original email address you registered with. You will be sent an email with a link to reset your password for that member account.

The old vBulletin forum was converted to phpBB format, requiring the passwords to be reset. If this is a problem for some because of a forgotten email address, please feel free to re-register with a new username. We are happy to welcome old and new members back to the forums! Thanks.

All new accounts are manually activated before you can post. Any questions can be PM'ed to Kayaker.

signalling problem in linux

RCE of Linux tools and programs.
Locked
rijnahts
Junior Member
Posts: 23
Joined: Sat Jun 21, 2008 12:00 pm

signalling problem in linux

Post by rijnahts »

Hi,
I am facing signaling issue when I use the pthread_cond_wait() function.

I have a process which contians two threads.
1. Main Thread
2. New Thread

The Main Thread always looks for the signals which are queued in the OS level specific to that process.I am using "sigwaitinfo()" in the main thread, so that the main thread will not consume any cpu resource until there are any signals in the queue. In the "New Thread" I have used the SigPorocMasK() so that this thread will ignore all the signals and all the signals will be handled only in the "Main Thread".

What I wanted is from "New Thread" I wanted to send a signal to different process, and "New Thread" should not get executed until other process sends a signal. For this I have send the signal to other process using Kill() and immediatley i am using pthread_cond_wait() in the "New Thread". Because of this "New Thread" will not be executed until its get singalled using the condition variable. I am able to see the signal in the other process, but when is send signal from other process to my process, the "Main Thread" in my process is not getting any signal. I have also tried sending signgal to my process from the console, but no use.

My doubt is if we use pthread_cond_wait, does it stop all other threads in the same process to receive the signals.
Please help me on this...Please let me know if any one has better idea than this.


Thanks
Locked