X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 22 Jul 2008 19:02:26 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: 1.7.0-19: Still unexplained path problems Message-ID: <20080722170226.GN5251@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <6086F48CE8E1479DB51E00035DFD5B14 AT cit DOT wayne DOT edu> <20080722094517 DOT GF5251 AT calimero DOT vinschen DOT de> <4885CCBE DOT 8090305 AT byu DOT net> <20080722135643 DOT GA21785 AT calimero DOT vinschen DOT de> <488609E0 DOT 5F425C4B AT dessent DOT net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <488609E0.5F425C4B@dessent.net> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: 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 On Jul 22 09:25, Brian Dessent wrote: > Corinna Vinschen wrote: > > > Can you create an strace of a testcase (building git or something) > > which shows where and how the paths are generated? Maybe we can > > workaround this in Cygwin itself by tweaking paths missing a / or \ > > after the colon... > > Here's a testcase: > > $ cat >tc.c < #include > #include > > int main() > { > char buf[512]; > > GetModuleFileName (NULL, buf, sizeof (buf)); > puts (buf); > return 0; > } > EOF > > $ gcc -mno-cygwin tc.c > > $ ./a > \\?\C:\cygwin\home\brian\testcases\native-argv0\a.exe Thanks for the testcase. I was looking into the path conversion code but it works as expected. It didn't occur to me that the problem might be related to using the long path name syntax when creating processes with CreateProcessW. Since GetModuleFileName just returns the path litarally as it has been specified in CreateProcess, native applications relying on the content (and not being wide path capable) have a good chance to fail. I applied a patch to Cygwin which avoid this. tclsh and insight both work fine for me now. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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/