Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Fri, 26 Aug 2005 11:11:59 -0400
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Problem with sh/bash and snapshot cygwin1-20050825.dll
Message-ID: <20050826151159.GH12490@trixie.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
References: <20050826144755.GF12490@trixie.casa.cgf.cx> <SERRANOt2GUBbVXUrCx0000032c@SERRANO.CAM.ARTIMI.COM>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <SERRANOt2GUBbVXUrCx0000032c@SERRANO.CAM.ARTIMI.COM>
User-Agent: Mutt/1.5.8i

On Fri, Aug 26, 2005 at 03:51:59PM +0100, Dave Korn wrote:
>----Original Message----
>>From: Christopher Faylor
>>Sent: 26 August 2005 15:48
>
>> On Fri, Aug 26, 2005 at 06:17:13AM -0600, Eric Blake wrote:
>>> While you're at it, fix realpath(NULL, buf) to set buf[0]='\0', instead
>>> of leaving garbage there.
>> 
>> What's the rationale for touching buf when realpath is returning an error
>> and setting EINVAL?
>> 
>> cgf
>
>  Standards-mandated leeway?
>
>http://www.opengroup.org/onlinepubs/009695399/functions/realpath.html
>
>Upon successful completion, [ ...  ].  Otherwise, realpath() shall
>return a null pointer and set errno to indicate the error, and the
>contents of the buffer pointed to by resolved_name are undefined.

That's not a rationale, it's an excuse for going to the extra effort.

I guess my vote is to fill the buffer with as many occurrences of
"cygwinisgreat" as will fit.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

