I have a C++ singleton class where you call methods to execute commands that are actually performed by a background thread. When a command is "requested" it is put in a queue and I use raise(SIGUSR2) to wake-up the background thread. The reason I use signals to wake-up the background thread is that it communicates with other processed using Unix Domain Sockets and is listening to socket activity using a kqueue() and can also conveniently be used to listen to raised signals.
When the singleton is constructed the first time I use signal(SIGUSR2, SIG_IGN) to ignore the default signal handler to kill the process. And this works great when running the program both in Xcode and in a terminal window BUT when I put a breakpoint in the program and GDB is run, the program crashes when raise(SIGUSR2) is executed and kills the process as if the signal(SIGUSR2, SIG_IGN) had not been called (which I know has been called). Is there a problem with disabling signal handling when running GDB in Xcode? Or am I doing something else wrong? Thanks for any input, / Påhl _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com