Threaded applications
A thread is considered to be connected to IBM® MQ from MQCONN (or MQCONNX) until MQDISC.
Synchronous signals
Synchronous signals arise in a specific thread.
- SIGBUS
- SIGFPE
- SIGSEGV
- SIGILL
If you are writing multithreaded applications, there is only one process-wide signal handler for each signal. When IBM MQ sets up its own synchronous signal handlers it saves any previously registered handlers for each signal. After IBM MQ handles one of the signals listed, IBM MQ attempts to call the signal handler that was in effect at the time of the first IBM MQ connection within the process. The previously registered handlers are restored when all application threads have disconnected from IBM MQ.
Because signal handlers are saved and restored by IBM MQ, application threads must not establish signal handlers for these signals while there is any possibility that another thread of the same process is also connected to IBM MQ.
- When an application establishes a signal handler after connecting to IBM MQ, the previous signal handler must be restored before the application disconnects from IBM MQ.
- When an application establishes a signal handler before connecting to IBM MQ, the application must disconnect from IBM MQ before restoring its signal handler.
Asynchronous signals
IBM MQ does not use any asynchronous signals in threaded applications unless they are client applications.
Additional considerations for threaded client applications
- SIGPIPE (for TCP/IP)