grantpt, unlockpt bug

Eric Blake eblake@redhat.com
Wed Sep 21 13:27:00 GMT 2011


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;
}

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
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



More information about the Cygwin mailing list