Reported by g_makulik (1263490390|%O ago)
I'm using OpenAPQ WireAPI within a multithreaded application, where the thread that sets up the message receive loop isn't the main thread, but is just one interface to interact with the process.
I should have some reasonable signal handling routines (esp. for SIGTERM, SIGINT & SIGQUIT) that allow to bring my application down using a proper shutdown behavior.
I've read the "Handling Ctrl-C in applications" tutorial of course, but it doesn't get to my point. It makes no sense if the thread using WireAPI 'detects' occurence of certain signals indirectly by asking for the connections (or sessions) alive flag, and inform my main application thread about this. I want to install my own signal handlers, period.
I've been trying several variants (using sigaction, signal), but I'm not able to install my own handlers for SIGTERM and SIGINT. For other signals everything is fine (so my basic approach how to install a signal handler works).
I've been trying to figure out from the WireAPI source code, how and when WireAPIs signal handlers are installed, but without success :-(.
Can anybody point me into the right direction, or is this a (unrecoverable) design flaw in WireAPI? If the latter, so I'd like to place a change request, to provide a mechanism that a WireAPI application may 'hook' the standard handlers somehow.
No files attached to this page.