Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Ice::CtrlCHandler Class Reference

Provides a portable way to handle Ctrl+C and Ctrl+C like signals. More...

#include <Ice/Ice.h>

Public Member Functions

 CtrlCHandler ()
 Constructs a CtrlCHandler with a null callback, meaning the callback does nothing.
 CtrlCHandler (const CtrlCHandler &)=delete
 CtrlCHandler (CtrlCHandlerCallback cb)
 Constructs a CtrlCHandler.
 ~CtrlCHandler ()
 Unregisters the callback function.
CtrlCHandlerCallback getCallback () const
 Gets the current signal callback.
CtrlCHandleroperator= (const CtrlCHandler &)=delete
CtrlCHandlerCallback setCallback (CtrlCHandlerCallback cb)
 Replaces the signal callback.

Detailed Description

Provides a portable way to handle Ctrl+C and Ctrl+C like signals.

On Linux and macOS, the CtrlCHandler handles SIGHUP, SIGINT and SIGTERM. On Windows, it is a wrapper for SetConsoleCtrlHandler.

Definition at line 21 of file CtrlCHandler.h.


The documentation for this class was generated from the following file: