uutils/coreutils

uu timeout is less precise than GNU timeout

Open

#11615 opened on Apr 3, 2026

View on GitHub
 (7 comments) (3 reactions) (0 assignees)Rust (23,246 stars) (1,852 forks)batch import
U - timeoutgood first issuereported-canonical-2

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