[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using TMOUT as default for read bultin is unwise

From: Stephane CHAZELAS
Subject: Re: Using TMOUT as default for read bultin is unwise
Date: Wed, 28 Mar 2012 18:26:23 -0000
User-agent: slrn/pre1.0.0-18 (Linux)

2011-09-14, 09:46(+01), Wheatley, Martin R:
> Description:
>       The contents of the environment variable TMOUT are used are the
>       default timeout for the read builtin command when reading from
>       a TTY or pipe AND as a shell command input idle time.
>       This can lead to random failures of shell scripts
>       I think the TMOUT should not be overloaded and its use as a default 
> value
>       for the read builtin - especially for sub-shell pipelines is dangerous
>       and should be discontinued otherwise all bash scripts that use the read 
> builtin
>       need to be modified to include TMOUT=0.

That's not the only problematic variable. See also

And here is what Geoff Glare from the Austin Group (the body
behind POSIX) had to say when I raised it some time ago:

In short: if one sets a TMOUT environment variable, the easy
fix is to tell them: DON'T!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]