X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com Subject: Re: [ANNOUNCEMENT] Updated: cygwin-1.5.19-1 Mail-Copies-To: never Reply-To: sds AT gnu DOT org X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. From: Sam Steingold In-Reply-To: (Brian Ford's message of "Wed, 18 Jan 2006 14:06:19 -0600") References: <20060118181027 DOT GA17787 AT calimero DOT vinschen DOT de> Mail-Followup-To: cygwin AT cygwin DOT com Date: Wed, 18 Jan 2006 15:30:43 -0500 Message-ID: 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 AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com > * Brian Ford [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/