Skip to content

timeout: return timed-out status after kill grace period#11392

Open
can1357 wants to merge 1 commit intouutils:mainfrom
can1357:timeout-return-timed-out-status-after-kill-grace-period
Open

timeout: return timed-out status after kill grace period#11392
can1357 wants to merge 1 commit intouutils:mainfrom
can1357:timeout-return-timed-out-status-after-kill-grace-period

Conversation

@can1357
Copy link
Contributor

@can1357 can1357 commented Mar 18, 2026

uutils timeout maps the -k/--kill-after post-timeout exit path to internal failure 125 when --preserve-status is not set. GNU reports 124 for this timed-out case, so timeout events are misclassified as utility failure.

Reproduction Steps

timeout -k 1 1 sleep 10; echo "exit=$?"
# Expected (GNU): exit=124
# Actual (uutils): exit=125

Impact

Scripts that branch on timeout status treat a normal timeout as an internal tool error. This breaks GNU-compatible timeout handling in automation and monitoring pipelines.

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.

1 participant