bug-bash
[Top][All Lists]
Advanced

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

Annoying feature of read tests


From: Greg Hudson
Subject: Annoying feature of read tests
Date: Tue, 9 Apr 2002 20:48:01 -0400

This bug may get filed away as "user shoots self in root," perhaps
justifiably, but I will have a go anyway.

If you "make check" in bash, one of the many tests it runs is
tests/read2.sub, which attempts to test the timeout feature of read.
(A cool feature, by the way.)  It does so by reading from stdin and
hoping that the user doesn't enter anything in the course of two
seconds.

Where this bites is if you run something like

  make check 2>&1 > check.out &
  tail -f check.out

When the read is done, the process gets a SIGTTIN.  The user who
glances over at the window waiting to see if things are done will have
to glance over several times before noticing that things have not
progressed in the last half hour, at which point ^C'ing the tail
reveals the problem.

Obviously, there are many ways to avoid this problem, including not
running "make check" in the first place.  But it's still weird
behavior unbecoming of a proper build system.  I'm not sure if the
"read -t 2 a" test really accomplishes anything which the "sleep 5 |
read -t 1 a" test does not, so I suggest just getting rid of it.



reply via email to

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