X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] Updated: cygwin-1.5.19-1
Mail-Copies-To: never
Reply-To: sds@gnu.org
X-Attribution: Sam
X-Disclaimer: You should not expect anyone to agree with me.
From: Sam Steingold <sds@gnu.org>
In-Reply-To: <Pine.CYG.4.58.0601181403430.468@PC1163-8460-XP.flightsafety.com> (Brian Ford's message of "Wed, 18 Jan 2006 14:06:19 -0600")
References: <announce.20060117033619.GA12055@coe.casa.cgf.cx> 	<u1wz5h2ed.fsf@gnu.org> <20060118181027.GA17787@calimero.vinschen.de> 	<umzhtfhky.fsf@gnu.org> 	<Pine.CYG.4.58.0601181403430.468@PC1163-8460-XP.flightsafety.com>
Mail-Followup-To: cygwin@cygwin.com
Date: Wed, 18 Jan 2006 15:30:43 -0500
Message-ID: <uirshffd8.fsf@gnu.org>
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
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

> * Brian Ford <Oevna.Sbeq@syvtugfnsrgl.pbz> [2006-01-18 14:06:19 -0600]:
>
> On Wed, 18 Jan 2006, Sam Steingold wrote:
>
>> here is a simple test case:
>>
>> int main (int argc, char *argv[]) {
>>   char executable[MAXPATHLEN];
>>   realpath(argv[0],executable);
>>   if (open(executable,O_RDONLY|O_BINARY,0644) < 0) return 1;
>>   else return 0;
>> }
>>
>> it worked (returned 0) before and it works on Linux.
>> it does not work now.
>
> Looks very similar to:
>
> http://www.cygwin.com/ml/cygwin/2004-09/msg00867.html

not only cygwin "drops extension" from argv[0] (as your bug report
says), it also fails to restore it in realpath().

the point here is that the return value of realpath() cannot fail to
open due to ENOENT - as it does on cygwin.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
http://www.openvotingconsortium.org http://www.mideasttruth.com
http://www.camera.org http://ffii.org http://truepeace.org
Winners never quit; quitters never win; idiots neither win nor quit.

--
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/

