add support of process signals
This commit is contained in:
1 parent
251988b19b
commit
93423e36af
2 files changed
+8
No files matched your search
@@ -652,6 +652,11 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
|
||||
Logger::log('Starting ManiaControl v' . self::VERSION . '!');
|
||||
|
||||
try {
|
||||
// Manage SIGTERM signal
|
||||
pcntl_signal(SIGTERM, function() {
|
||||
$this->quit("Stop signal received from the OS.", false);
|
||||
});
|
||||
|
||||
// Connect to server
|
||||
$this->connect();
|
||||
|
||||
|
||||
Reference in new issue
Block a user