delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/09/21/00:33:40

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY
X-Spam-Check-By: sourceware.org
X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o-
Date: Wed, 21 Sep 2011 00:33:09 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: grantpt, unlockpt bug
Message-ID: <20110921043309.GA2676@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4E791796 DOT 90909 AT redhat DOT com>
MIME-Version: 1.0
In-Reply-To: <4E791796.90909@redhat.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019