In termios.t, avoid reading uninitialised memory in the tests.
authorNicholas Clark <nick@ccl4.org>
Tue, 6 Sep 2011 12:12:22 +0000 (14:12 +0200)
committerNicholas Clark <nick@ccl4.org>
Tue, 13 Sep 2011 09:28:04 +0000 (11:28 +0200)
commit4e453fcc36412d4d4c1f6ea1c3558786137b81db
tree9eab2be64893bbff415374feb3d794c2c675c130
parent674d0cd93bd328db0075c660030401d94c10c1e0
In termios.t, avoid reading uninitialised memory in the tests.

If no terminal devices are found, or getattr() fails on all of them, then
the struct termios wrapped by the POSIX:Termios object will consist of
initialised memory. In this case, it's not possible to use getcc() or the
other get*() methods on it.

Try harder to find a terminal device - as well as STDIN, STDOUT and STDERR
also try to open the controlling terminal directly.
ext/POSIX/t/termios.t