On Thursday 22 October 2009 01:10:33 Jan Schampera wrote: > Jo King schrieb: > > Fix: > > [ bash/the read code could > > detect there's no stdin and sleep for 1-2 seconds] > > If you consider this as a bug, the bug is not in Bash (but in the > application). > > In short you request that read should wait a second, once it got a > end-of-file signalled, I don't think this is the way to 'fix' this > 'bug'. It has far too many side effects or impacts to other uses of > read. Fix your application instead, query the exit code of read > (non-zero on EOF, timeout or error) and insert a conditional sleep > yourself.
and the code can easily be "fixed" b adding "-t 1" to the read invocation -mike
signature.asc
Description: This is a digitally signed message part.