mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-01 12:26:38 -05:00
Exit code and logging invariants for log_fatal and hardware log_error
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
Some checks are pending
Build / build-mac (push) Waiting to run
Build / build-linux (push) Waiting to run
Build / build-arm32 (push) Waiting to run
Build / build-win (push) Waiting to run
Build / build-freebsd (push) Waiting to run
Build / build-musl (push) Waiting to run
CodeQL Advanced / Analyze (c-cpp) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
This commit is contained in:
parent
c2d46f4039
commit
51b5020b8e
14 changed files with 120 additions and 24 deletions
|
|
@ -124,6 +124,9 @@ SnapRAID is designed to recover from an interruption, including `SIGKILL`, at an
|
|||
Or use callback iteration helpers: `tommy_list_foreach()`, `tommy_list_foreach_arg()`, `tommy_hashdyn_foreach()`, etc.
|
||||
- **Cleanup**: Use `goto` pattern for cleanup in complex functions when appropriate
|
||||
- **Fatal paths**: Use `exit(EXIT_FAILURE)` for unrecoverable errors; `os_abort()` for internal inconsistencies
|
||||
- **Exit Code & Logging Invariants**:
|
||||
- `log_fatal()`: Any invocation of `log_fatal()` represents an unrecoverable failure and must force a non-zero exit code upon termination.
|
||||
- `log_error()`: Whenever `log_error()` is called with a hardware error (`is_hw_errno(err)`), it must force a non-zero exit code upon termination.
|
||||
|
||||
#### Threading
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue