Skip to content

Conversation

@SimonHeimberg
Copy link
Contributor

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.

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.
@SimonHeimberg
Copy link
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
@SimonHeimberg SimonHeimberg force-pushed the patch-2 branch 2 times, most recently from 3fe4c15 to 7e98aeb Compare August 14, 2018 09:59
@SimonHeimberg
Copy link
Contributor Author

SimonHeimberg commented Aug 14, 2018

have just seen that this is an alternative to pr #111, did not see this pr before

@SimonHeimberg
Copy link
Contributor Author

a version of this patch, backported to have old backup expiration, is at branch fixedRunningPidCheck_oldBackupExpiration

@laurent22
Copy link
Owner

Is it the same fix as in #163 ?

@SimonHeimberg
Copy link
Contributor Author

Is it the same fix as in #163 ?

yes, it is

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

Successfully merging this pull request may close these issues.

2 participants