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

Empty pid file bug #23

Open
mjk-old opened this issue Jun 1, 2015 · 0 comments
Open

Empty pid file bug #23

mjk-old opened this issue Jun 1, 2015 · 0 comments

Comments

@mjk-old
Copy link

mjk-old commented Jun 1, 2015

When the pid file is empty pid and read_pid_file methods return 0, because en empty string is converted to zero by to_i. And since process with pid 0 always exists in the system the daemon can't be started or restarted. That also happens for other non-integer content of the pid file

Empty pid file can occur when there's no space left on device. Additionally, number of bytes could be checked to distinguish this case (and maybe delete the pid file?).

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