On Tue, 2011-04-05 at 16:29 +0200, Roger Oberholtzer wrote:
I am using a library that starts lots of threads. It is a proprietary lib and there is no choice as it talks to some company's fancy schmancy hardware.
The problem I have is that, it seems (strace is great), this library does not set it up so the threads it creates will not receive signals. In my own much-better-behaved-if-I-do-say-so code, I use pthread_sigmask in the created thread to say that I do not want various signals. Since I see my SIGIO signal delivered to both my thread (really the original process not a thread) or any of the threads created in the library, I think this is what is happening.
My question is: how can I turn off delivery of signals to threads I did not create? I basically need to try to do for the threads what they did not do themselves. Add to that: how can a process find out what threads there are? I would imagine that if signal fiddling is even possible, I may need to know this as well.
(Sorry for posting again.) Instead of trying to figure a way to change a thread's signal settings, I have tried setting the process signal mask to block the signal I do not want the threads to see before the threads are created. After I 'think' the threads have been created, I then set it to how I want the parent process to have it. Still, at some point a thread gets my signal. In strace, I only see the main process fiddling with threads. It does not look to me like any thread is mucking about. Is it the case that a thread has to actively change it's signal preferences? A change in the parent thread - after the 'child' thread is created, should not effect the child thread's signals. Or do I have this all wrong? Yours sincerely, Roger Oberholtzer OPQ Systems / Ramböll RST Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org