Get suspends from logind to ignore watchdog then #29
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.
On every resume, the watchdog thread happily reports that there has been
a deadlock since the canary hasn't responded since before the computer
resumed. Get notifications from logind over dbus to tell when suspend
happens and ignore the one watchdog violation that might happen then.
On start-suspend, this ignores a single timeout indefinitely. On resume, that
ignore gets a timeout of 2 seconds in the future (configurable), if it hasn't
already been tripped. At any point if a real deadlock occurs, it will take a max
of two watchdog periods to recognize it. If the configurable timeout is zero,
no ignores happen and the extra dbus work is skipped.
This code is not Y2038 safe... but neither is the old code.
Addresses #13, which has apparently been around for almost 10 years in some form.