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;; (1) EOF;; (*) if [ "$ret" -gt 128 ] && [ "$(kill -l "$ret")" = ALRM ] then TIMEOUT else UNKNOWN fi ;; esac -- Stéphane