From 508807af1c6d8c1c66a73b26e4d5739e554ed451 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 1 Apr 2023 08:11:05 -0400 Subject: [PATCH] Fix namespace issue with posix function in Worker\Repository\Process - [Composer] Add ext-posix dependency - [Composer] Sort latest added dependencies alphabetically - Address https://github.com/friendica/friendica/issues/12486#issuecomment-1492842672 --- composer.json | 7 ++++--- src/Core/Worker/Repository/Process.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 509605b1ca..bb675c651e 100644 --- a/composer.json +++ b/composer.json @@ -24,6 +24,7 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-openssl": "*", + "ext-posix": "*", "ext-simplexml": "*", "ext-xml": "*", "asika/simple-console": "^1.0", @@ -34,6 +35,7 @@ "friendica/json-ld": "^1.0", "geekwright/po": "^2.0", "guzzlehttp/guzzle": "^6.5", + "kornrunner/blurhash": "^1.2", "league/html-to-markdown": "^4.8", "level-2/dice": "^4", "lightopenid/lightopenid": "dev-master", @@ -49,6 +51,7 @@ "phpseclib/phpseclib": "^3.0", "pragmarx/google2fa": "^5.0", "pragmarx/recovery": "^0.2", + "psr/clock": "^1.0", "psr/container": "^1.0", "psr/log": "^1.1", "seld/cli-prompt": "^1.0", @@ -71,9 +74,7 @@ "npm-asset/moment": "^2.24", "npm-asset/perfect-scrollbar": "0.6.16", "npm-asset/textcomplete": "^0.18.2", - "npm-asset/typeahead.js": "^0.11.1", - "kornrunner/blurhash": "^1.2", - "psr/clock": "^1.0" + "npm-asset/typeahead.js": "^0.11.1" }, "repositories": [ { diff --git a/src/Core/Worker/Repository/Process.php b/src/Core/Worker/Repository/Process.php index eb8fb07e32..b18a5b443d 100644 --- a/src/Core/Worker/Repository/Process.php +++ b/src/Core/Worker/Repository/Process.php @@ -112,7 +112,7 @@ class Process extends BaseRepository try { $processes = $this->db->select(static::$table_name, ['pid'], ['hostname' => $this->currentHost]); while ($process = $this->db->fetch($processes)) { - if (!posix_kill($process['pid'], 0)) { + if (!\posix_kill($process['pid'], 0)) { $this->db->delete(static::$table_name, ['pid' => $process['pid']]); } }