This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: grantpt, unlockpt bug


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 <errno.h>
>#include <stdio.h>
>#include <stdlib.h>
>#include <assert.h>
>int main (void)
>{
>   assert (grantpt (-1) == -1);
>   assert (errno == EBADF);
>   errno = 0;
>   assert (grantpt (99) == -1);
>   assert (errno == EBADF);
>   return 0;
>}

I checked in a simple fix for this.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]