holoscan::SignalHandler
holoscan::SignalHandler
holoscan::SignalHandler
The SignalHandler class provides a mechanism to handle signals in a C++ program.
The SignalHandler class provides a way to handle signals in a C++ program. It allows registering global signal handlers and context-specific signal handlers. The class is implemented as a singleton, and its instance can be obtained using the get_instance() method.
Constructs a SignalHandler object.
Destructs a SignalHandler object.
Returns the singleton instance of the SignalHandler class.
Returns: SignalHandler& The singleton instance of the SignalHandler class.
The static method to handles the specified signal.
Parameters
The signal to handle.
Installs the signal handler for the specified signal.
Parameters
The signal to install the signal handler for. If signal is 0, the signal handler is installed for all existing signals.
Registers a global signal handler for the specified signal.
Parameters
The signal to register the global signal handler for.
The global signal handler function.
If true, overwrites any existing global signal handler for the specified signal.
Registers a context-specific signal handler for the specified signal.
Parameters
The context to register the signal handler for.
The signal to register the signal handler for.
The signal handler function.
If true, overwrites any existing signal handler for the specified context and signal.
Unregisters the global signal handler for the specified signal.
Parameters
The signal to unregister the global signal handler for.
Unregisters the context-specific signal handler for the specified context and signal.
Parameters
The context to unregister the signal handler for.
The signal to unregister the signal handler for.
Clears all signal handlers.
Clears all global signal handlers.
Clears all context-specific signal handlers.