uu timeout is less precise than GNU timeout
Open
Nobody has claimed this yet.
good first issue
reported-canonical-2
U - timeout
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
uu timeout sleeps for 100ms intervals at https://github.com/uutils/coreutils/blob/2319a99057d11b0c9744c885df84806eea019166/src/uucore/src/lib/features/process.rs#L163 instead of using timer_create or setitimer,
which are more precise.
timeout (GNU coreutils) 9.7
Packaged by Debian (9.7-3) Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Written by Padraig Brady. root@b082d601e194:/tmp# time timeout 0.01 sleep 1
real 0m0.014s
user 0m0.000s
sys 0m0.004s
root@03081849be59:/tmp# timeout --version
timeout (uutils coreutils) 0.6.0
root@03081849be59:/tmp# time timeout 0.01 sleep 1
real 0m0.117s
user 0m0.002s
sys 0m0.014s ```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/uucore/src/lib/features/process.rs around line 163 and reproduce the reported timeout 0.01 sleep 1 timing difference against GNU timeout. Inspect the 100ms sleep behavior and the mentioned timer_create or setitimer options. Done means timeout no longer adds the reported coarse delay while preserving the command's existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100