Check that the PID isn't null or 0 in Ssh/Client.php #4065
Unanswered
JohnQDeveloper
asked this question in
Bugs
Replies: 1 comment
-
deployer/src/Ssh/SshClient.php Line 92 in 4b7e13a Is the current one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Deployer Version
7.5.12
Target OS
Ubuntu 24.04 LTS / Server
Which PHP version are you using?
PHP 8.4
Content of deploy.php or deploy.yaml
It's not explicitly related to the deploy.php, just running custom commands that might fail in strange ways with the run() function for SSH.
Steps to reproduce
if($pid > 0)
$this->run($host, "kill -9 -$pid");
We probably should check for a pid that isn't null/other invalid value for this as it bombs out in rare but possible situations:
run ps x | grep 7527577c89911ab5840d | grep -v grep | awk '{print $1}'
run kill -9 -
bash: line 1: kill: -: arguments must be process or job IDs
Beta Was this translation helpful? Give feedback.
All reactions