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

Print an error when daemon pidfile dir doesn't exist #1252

Merged

Conversation

thepry
Copy link
Contributor

@thepry thepry commented Feb 16, 2024

Issue #1251

Print an error when daemon pidfile dir doesn't exist and daemon can not start.

I've decided to add a simple dir check before the process daemonizes and redirects it's $stderr and $stdout. As an alternative we could pass noclose=true to Process.daemon (https://ruby-doc.org/3.3.0/Process.html#method-c-daemon) and manually redirect outputs to dev/null after we successfully wrote to pidfile, but that leads to other issues. For example Rspec output get silenced in daemon_spec.

@bensheldon bensheldon added the bug Something isn't working label Feb 22, 2024
@bensheldon bensheldon merged commit 8070be8 into bensheldon:main Feb 22, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging this pull request may close these issues.

2 participants