diff --git a/src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php b/src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php index 21f1245e7e..139fc25111 100644 --- a/src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php +++ b/src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php @@ -74,8 +74,8 @@ trait BlockingStoreTestTrait // Block SIGHUP signal pcntl_sigprocmask(SIG_BLOCK, [SIGHUP]); - $store = $this->getStore(); try { + $store = $this->getStore(); $store->save($key); // send the ready signal to the parent posix_kill($parentPID, SIGHUP); @@ -87,7 +87,8 @@ trait BlockingStoreTestTrait usleep($clockDelay); $store->delete($key); exit(0); - } catch (\Exception $e) { + } catch (\Throwable $e) { + posix_kill($parentPID, SIGHUP); exit(1); } }