Fix check for pre-existing eggdrop via pid file #1630
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Found by: theZoMBiE
Patch by: michaelortmann
Fixes:
One-line summary:
Problem was reported as: eggdrop in a docker. sometimes server does not shutdown properly. when containers start back up, eggdrop keeps telling to delete the bot.pid file.
Additional description (if needed):
In general, with or without random PIDs, it could happen, a new eggdrop could end up with the same PID as the old one stored in the pid file. There cannot be 2 processed with the same PID, so if the new eggdrop has the same PID as the one in the pid file, that new eggdrop can conclude it just got the same PID and can go on starting up.
Test cases demonstrating functionality (if applicable):