On 2012-06-09 11:29 +0200, Thomas Dickey wrote:

> On Sat, Jun 09, 2012 at 10:36:00AM +0200, Sven Joachim wrote:
>
>> Also, shouldn't the test check whether opening /dev/tty was actually
>> successful?
>
> I assumed in that instance that poll would simply fail :-)

Well, it returns 0 which you treat as success.  From the manpage:

 The field  fd contains a  file descriptor for  an open file.   If this
 field is negative, then the  corresponding events field is ignored and
 the  revents  field returns  zero.

Cheers,
       Sven



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to