This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: grantpt, unlockpt bug
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 21 Sep 2011 00:33:09 -0400
- Subject: Re: grantpt, unlockpt bug
- References: <4E791796.90909@redhat.com>
- Reply-to: cygwin at cygwin dot com
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