Date: Wed, 3 Dec 2025 12:15:17 +0100
From: =?UTF-8?B?TMOpYSBHcmlz?= <[email protected]>
Message-ID: <[email protected]>
| Ok then why does Bash parses the string value into float for the TMOUT
What makes you believe that it does? Just that it doesn't generate an
error? Can you actually detect the difference between a timeout of 3
seconds, and one of 3.14... seconds?
Bash dates from the days when if an integer value was expected in a
variable, its value would be obtained using atoi($VAR) (in effect).
Whether it does or not, I have no idea, but that inspecting $TMOUT gives
you the original 3.14... (or 3,14...) string means nothing, that is just
a string of characters, you can set TMOUT='dead frogs smell bad' and
$TMOUT will be that value as well.
printf(1) on the other hand is required to validate its input for
connectness. Probably it should allow either the locale's decimal
point, or '.' (the standard C locale version), but that has nothing
at all to do with TMOUT.
kre