Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isRunning is not working in docker container #33

Open
sinamiandashti opened this issue Nov 30, 2019 · 1 comment
Open

isRunning is not working in docker container #33

sinamiandashti opened this issue Nov 30, 2019 · 1 comment

Comments

@sinamiandashti
Copy link

Hello im using php-fpm alpine docker

the isRunning function always says true because the output of this code :
$result = shell_exec(sprintf('ps %d 2>&1', $this->pid));

is something like this :
PID USER TIME COMMAND\n 1 root 0:00 {supervisord} /usr/bin/python2 /usr/bin/supervisord -n -c /etc/supervisord.conf\n 15 root 0:00 crond -f /dev/null\n 17 root 0:00 php-fpm: master process (/usr/local/etc/php-fpm.d/www.conf)\n 18 root 0:00 nginx: master process /usr/sbin/nginx -g daemon off; error_log /dev/stderr info;\n 19 nginx 0:00 nginx: worker process\n 20 nginx 0:00 nginx: worker process\n 21 nginx 0:00 php-fpm: pool www\n 22 nginx 0:00 php-fpm: pool www\n 23 nginx 0:00 php-fpm: pool www\n 114 root 0:00 /bin/bash\n 270 root 0:00 php artisan streams:uptime\n 275 root 0:00 ps 90\n

so the count check after (the if statement) always get TRUE because it returns mother than 2 rows

@sinamiandashti
Copy link
Author

im investigating and maybe send you a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant