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]

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


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