New argument `--kill-wait` controls maximum time earlyoom waits for a killed process to exit
This pull request introduces a new configurable option, --kill-wait SECONDS, to control the maximum time earlyoom waits for a killed process to exit. The implementation includes updates to the CLI, input validation, documentation, and associated tests. This change allows users to adjust the wait timeout (default 10 seconds) to better handle processes that take longer to terminate.
New feature: Configurable process wait timeout
- Added a --kill-wait SECONDS command-line option to set the maximum wait time (in seconds) for a killed process to exit, with input validation.
- Updated the poll_loop_args_t struct and related logic to store and use the new kill_wait_timeout_secs value, defaulting to 10 seconds.
- Modified the process waiting logic in kill_wait to use the user-specified timeout.
Documentation and testing
- Updated the documentation (MANPAGE.md, README.md) to describe the new --kill-wait option and its usage.
- Added and updated CLI tests to verify correct handling of the --kill-wait flag, including invalid values and edge cases.
Internal constants and options
- Introduced a new constant for the maximum allowed wait timeout and updated the CLI options enum accordingly.
合并状态:未合并 1 条评论