Re: [doc] read -t and sockets, devices...

2008-06-15 Thread Stephane Chazelas
On Sat, Jun 14, 2008 at 10:15:06PM -0400, Chet Ramey wrote: > Stephane Chazelas wrote: > >> What about a different $? (like 2 for timeout)? > > That's reasonable. I'm thinking 128+SIGALRM. [...] That makes sense, but it's a bit of a pain to handle. read -t 10 var; ret=$? case $ret in (0) OK;;

Re: [doc] read -t and sockets, devices...

2008-06-14 Thread Chet Ramey
Stephane Chazelas wrote: What about a different $? (like 2 for timeout)? That's reasonable. I'm thinking 128+SIGALRM. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/

Re: [doc] read -t and sockets, devices...

2008-06-13 Thread Stephane Chazelas
On Fri, Jun 13, 2008 at 06:52:48PM -0400, Chet Ramey wrote: [...] >> Also, it may be good to specify that, if the timeout is >> reached, bash will consume the input but will not put >> that consumed input into the variable: > > Actually, the bash-4.0 implementation will put the input

Re: [doc] read -t and sockets, devices...

2008-06-13 Thread Chet Ramey
Stephane Chazelas wrote: However, I find that it does have an effect on Unix or TCP sockets, on /dev/random and other terminals than "the" terminal. So maybe a better wording could be: "This option has no effect on regular files"? Thanks, I'll put in s

[doc] read -t and sockets, devices...

2008-06-05 Thread Stephane Chazelas
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='ba