skip to main content
Developing an Interface Provider (IP) : Designing and implementing the required IP functions : Using signals
 

Using signals

Customer applications that use the embedded OpenAccess SDK Server must update the signals on UNIX used with previous editions of OpenAccess SDK. The OpenAccess SDK service and embedded service use signals on UNIX for various purposes. For the embedded server environment, this caused problems when the implementer wanted the calling application to handle the signals.
In OpenAccess SDK 8.1, the signals SIGCLD, SIGTERM, SIGINT and SIGHUP are no longer cached by the embedded service component. This allows the embedding application to write its own termination code on receiving these signals. See the sample program of how to use these signals is available in the installdir\shlibsrv\oac\oasrvu.c on the Linux/UNIX platforms.
The following table summarizes the use of signals in the embedding application:
 
Table 6: Signals for the OpenAccess SDK services 
Signal
OpenAccess SDK service
OpenAccess SDK embedded service
SIGINT
Stops the service. The signal is handled by the command task, and is blocked or ignored by the service.
Not used in OpenAccess SDK 8.1
SIGTERM
Stops the service. The signal is handled by the command task, and is blocked or ignored by the service.
Not used in OpenAccess SDK 8.1
SIGHUP
Stops the service. The signal is handled by the command task, and is blocked or ignored by the service.
Not used in OpenAccess SDK 8.1
SIGCLD
Used only in the OpenAccess SDK Agent. The signal is not used for a data access service.
Not used in OpenAccess SDK 8.1
SIGIPE
Must be always blocked or ignored. Turn off by setting ServiceCatchExceptions to False.
Must be always blocked or ignored. Turn off by setting ServiceCatchExceptions to False.
SIGBUS
Turn off by setting ServiceCatchExceptions to False.
Turn off by setting ServiceCatchExceptions to False.
SIGSEV
Turn off by setting ServiceCatchExceptions to False.
Turn off by setting ServiceCatchExceptions to False.
SIGILL
Turn off by setting ServiceCatchExceptions to False.
Turn off by setting ServiceCatchExceptions to False.
SIGUSR1
Is not overwritten when a handler on this signal is installed by the IP init() function.
Is not overwritten when a handler on this signal is installed by the IP init() function.
Note: Using signals within IP-modules is not recommended.
Note: SIGPIPE must be always blocked or ignored. Not doing this may cause the server process to exit, for example, when a client has exited its application abnormally.