Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with re-registering master handlers
OMRSIG_SIGACTION can be called outside of omrsignal.c functions. A call to OMRSIG_SIGACTION will override the master handlers set by either omrsig_protect or omrsig_set_async_signal_handler. Setting a master handler once sets a bit in signalsWithMasterHandlers. If the master handler is overridden by an external call to OMRSIG_SIGACTION, then the bit in signalsWithMasterHandlers will not be un-set. Since the bit in signalsWithMasterHandlers isn't un-set once the master handler has been overridden, then subsequent calls to omrsig_protect and omrsig_set_async_signal_handler will not re-register the master handler. In subsequent calls, it will look as if the master handler is already registered. We mustn't rely on signalsWithMasterHandlers to re-register master handlers. It doesn't cause any harm to register master handlers every time a call is made to either omrsig_protect or omrsig_set_async_signal_handler. Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
- Loading branch information