mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[BUG][CODE] remove the panic hook / ensure that it shuts down / restarts the process #337
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @raggi on GitHub (Apr 14, 2024).
The panic hook is nice in that it might allow for a log entry on panic. The problem is that the reliability of this is unpredictable, because panic hooks in general are hard to make safe/sound.
It's very unsafe/unsound in almost all cases for the process to keep going after a panic, as it's possible that a panic happening can allow objects to be in a state that violates safety rules, at which point we're working from some kind of corrupt state.
In the somewhat more common case, panics will abort threads, as an example I just caught such a case which terminates the command processing thread:
We should ensure that the process exits after a panic happens. We could choose to restart the process in some way, or not to, but continuing is likely to perpetuate some really tricky to track down issues.