Re: grantpt, unlockpt bug

2011-09-20 Thread Christopher Faylor
On Tue, Sep 20, 2011 at 04:45:42PM -0600, Eric Blake wrote: >Bruno Haible reported that grantpt and unlockpt report success even on >invalid fds. This program fails the assertion at line 7: > >#include >#include >#include >#include >int main (void) >{ > assert (grantpt (-1) == -1); > asse

grantpt, unlockpt bug

2011-09-20 Thread Eric Blake
Bruno Haible reported that grantpt and unlockpt report success even on invalid fds. This program fails the assertion at line 7: #include #include #include #include int main (void) { assert (grantpt (-1) == -1); assert (errno == EBADF); errno = 0; assert (grantpt (99) == -1); asser