QcSignalWatcher Class
Turns the requests to end the process from outside (SIGTERM from a service manager or kill, SIGINT from Ctrl+C; on Windows the console's close and Ctrl+C events) into the signal stopRequested() in the event loop, so a server saves before it ends (decision E-255). More...
| Header: | #include <headless/QcSignalWatcher.h> |
| Inherits: | QObject |
Public Functions
| QcSignalWatcher(const QcSignalWatcher &) | |
| QcSignalWatcher(QcSignalWatcher &&) | |
| bool | isWatching() const |
| QcSignalWatcher & | operator=(QcSignalWatcher &&) |
| QcSignalWatcher & | operator=(const QcSignalWatcher &) |
Signals
| void | stopRequested(const QString &name) |
Detailed Description
After the first request the default handling is back: a second Ctrl+C ends the process at once. One instance per process.
Member Function Documentation
[delete] QcSignalWatcher::QcSignalWatcher(const QcSignalWatcher &)
Copy-constructs an instance of QcSignalWatcher. This function is deleted.
[delete] QcSignalWatcher::QcSignalWatcher(QcSignalWatcher &&)
Move-constructs an instance of QcSignalWatcher. This function is deleted.
bool QcSignalWatcher::isWatching() const
Returns whether the handlers are installed (false when another watcher exists or the system refused).
[signal] void QcSignalWatcher::stopRequested(const QString &name)
name is the request, e.g. "SIGTERM".
[delete] QcSignalWatcher &QcSignalWatcher::operator=(QcSignalWatcher &&)
Move-assigns other to this QcSignalWatcher instance. This function is deleted.
[delete] QcSignalWatcher &QcSignalWatcher::operator=(const QcSignalWatcher &)
Copy-assigns other to this QcSignalWatcher instance. This function is deleted.