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
This commit is contained in:
Hypolite Petovan 2023-04-01 08:11:05 -04:00
parent f1843c8aac
commit 508807af1c
2 changed files with 5 additions and 4 deletions

View File

@ -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": [
{

View File

@ -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']]);
}
}