fix checking of running pid#129
Closed
SimonHeimberg wants to merge 2 commits intolaurent22:masterfrom
Closed
Conversation
When pgrep lists multiple pids, the check for a pid fails. So use the same logic as for NETBSD, with some flags of ps adapted because they mean something different.
Contributor
Author
|
Did some testing with running 3 times the same backup and 1x another one. There is a race condition between checking and creating the INPROGRESS_FILE. But this is probably not relevant in reality. (I had to do several tries of testing to avoid this race condition.) |
grep -q seems quite portable and stops directly at the first match
3fe4c15 to
7e98aeb
Compare
Contributor
Author
|
have just seen that this is an alternative to pr #111, did not see this pr before |
This was referenced Aug 18, 2018
Contributor
Author
|
a version of this patch, backported to have old backup expiration, is at branch fixedRunningPidCheck_oldBackupExpiration |
Owner
|
Is it the same fix as in #163 ? |
Contributor
Author
yes, it is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When pgrep lists multiple pids, the check for a pid fails.
Use the same logic as for NETBSD, with some flags of ps adapted because they mean something different.