This is the mail archive of the
cygwin
mailing list for the Cygwin project.
grantpt, unlockpt bug
- From: Eric Blake <eblake at redhat dot com>
- To: cygwin <cygwin at cygwin dot com>
- Date: Tue, 20 Sep 2011 16:45:42 -0600
- Subject: grantpt, unlockpt bug
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