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

Move PID deletion out of DEMOLISH method #79

Closed
wants to merge 1 commit into from
Closed

Conversation

theory
Copy link
Member

@theory theory commented Feb 16, 2024

There is no guarantee from Perl that it's called in a timely manner or order when shutting down. The pid_file field may no longer be set. This might explain why the PID file was never cleaned up.

Move it instead to the run method, where it should always run once a signal handler has set continue to false. It exits the loop on the next run, then cleans up the PID file before exiting. At least that's the idea.

Move the PID test to the run test section of t/consumer.t, since run is where it happens now.

There is no guarantee from Perl that it's called in a timely manner or
order when shutting down. The `pid_file` field may no longer be set.
This might explain why the PID file was never cleaned up.

Move it instead to the `run` method, where it should always run once a
signal handler has set `continue` to false. It exits the loop on the
next run, then cleans up the PID file before exiting. At least that's
the idea.

Move the PID test to the `run` test section of `t/consumer.t`, since
`run` is where it happens now.
@theory theory added the bug label Feb 16, 2024
@theory theory self-assigned this Feb 16, 2024
@theory theory deleted the branch consumer-log February 16, 2024 22:37
@theory theory closed this Feb 16, 2024
@theory theory deleted the fix-pid branch February 16, 2024 22:56
@theory
Copy link
Member Author

theory commented Feb 16, 2024

Not sure how this PR became closed, but I reopened it as #80.

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

Successfully merging this pull request may close these issues.

1 participant