diff --git a/lib/Service.php b/lib/Service.php index 3ac3c4bf..9218a905 100644 --- a/lib/Service.php +++ b/lib/Service.php @@ -45,7 +45,7 @@ class Service { do { sleep((int) max(0, $t->getTimestamp() - time())); pcntl_signal_dispatch(); - if ($this->hangup) { + if ($this->reload) { $this->reload(); } } while ($this->loop && $t->getTimestamp() > time()); @@ -57,9 +57,10 @@ class Service { public function reload(): void { $this->reload = false; - unset(Arsse::$user, Arsse::$db, Arsse::$conf, Arsse::$lang, Arsse::$obj, $this->drv); + Arsse::$user = Arsse::$db = Arsse::$conf = Arsse::$lang = Arsse::$obj = $this->drv = null; Arsse::bootstrap(); $this->__construct(); + fwrite(\STDERR, Arsse::$lang->msg("Service.Reload").\PHP_EOL); } public function checkIn(): bool { @@ -126,6 +127,6 @@ class Service { * * @codeCoverageIgnore */ protected function sigHup(int $signo): void { - $this->hangup = true; + $this->reload = true; } } diff --git a/locale/en.php b/locale/en.php index 87c11bd3..a439a45b 100644 --- a/locale/en.php +++ b/locale/en.php @@ -6,6 +6,7 @@ return [ 'CLI.Auth.Success' => 'Authentication successful', 'CLI.Auth.Failure' => 'Authentication failed', + 'Service.Reload' => 'Configuration reloaded', 'API.Miniflux.DefaultCategoryName' => "All", 'API.Miniflux.ImportSuccess' => 'Feeds imported successfully', diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 6bb05aea..e17ef0f9 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -12,6 +12,7 @@ const DOCROOT = BASE."tests".DIRECTORY_SEPARATOR."docroot".DIRECTORY_SEPARATOR; ini_set("memory_limit", "-1"); ini_set("zend.assertions", "1"); ini_set("assert.exception", "true"); +// FIXME: Workaround for a bug in PCRE2 10.37 ini_set("pcre.jit", "0"); // FIXME: This is required by a dependency of Picofeed error_reporting(\E_ALL & ~\E_DEPRECATED);