Red Hat Bugzilla – Bug 22273
watch does not redirect program's input
Last modified: 2007-04-18 12:30:12 EDT
When I run "watch program" and a program decides to talk to me and wait for
input, watch just hangs (without displaying any output at all). Watch
should probably redirect the stdin from /dev/null or do something similar
to prevent such situation.
I have procps-2.0.6-5, glibc-2.1.3-21, and kernel 2.2.16 installed of RH
watch isn't designed for use with that sort of program. Don't do that.
I was doing "watch make" and it turned out that while it normally works, in some
cases make would run latex and latex would ask for input when there is a bug.
In any case, since watch can not do anything reasonable anyway when the watch'ed
program wants input, why not redirect the input? It definitely wouldn't make
things worse, but it can make things better.
Closed stdin and reassigned to /dev/null.