Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-ID: <40BF9638.F9E3C45B@phumblet.no-ip.org> Date: Thu, 03 Jun 2004 17:20:56 -0400 From: "Pierre A. Humblet" Reply-To: Pierre DOT Humblet AT ieee DOT org MIME-Version: 1.0 To: Jacek Trzmiel CC: cygwin AT cygwin DOT com Subject: Re: cvs checkout fails in directory that can be accessed via both textmode and binmode mounts References: <40BE0711 DOT 2C4AB5AF AT hot DOT pl> <40BF649B DOT DF23035 AT hot DOT pl> <20040603191305 DOT GB246877 AT Worldnet> <40BF7A8A DOT E62B651F AT hot DOT pl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Jacek Trzmiel wrote: > > Hi Pierre, > > > In fact that's normal. When cygwin starts under strace it only knows > > the Windows current directory. > > Thanks for info. > > > Please try > > cd / > > strace -o trace.txt sh -c "cd /testmnt/cygwin/test; cvs something" > > choosing a "something" that displays the problem without > > generating a huge trace. > > Attached result of: > sc0rp AT sc0rp / > $ strace -o ~/strace2.out sh -c "cd /testmnt/cygwin/test; cvs -d > /testmnt/cvsrep co prj" > : No such file or directoryirectory /testmnt/cvsrep/prj > cvs checkout: skipping directory prj You have exposed an old bug in Cygwin. This is what happens 245 146689 [main] cvs 696 open: open (./CVS/Entries, 0x602) 65 146754 [main] cvs 696 normalize_posix_path: src ./CVS/Entries 62 146816 [main] cvs 696 cwdstuff::get: posix /testmnt/cygwin/test/prj CVS/Entries is opened in text mode and /testmnt/cvsrep/prj is written to it 65 156719 [main] cvs 696 open: open (., 0x0) 68 156787 [main] cvs 696 normalize_posix_path: src . 60 156847 [main] cvs 696 cwdstuff::get: posix /testmnt/cygwin/test/prj 61 158197 [main] cvs 696 open: 6 = open (., 0x0) 63 158260 [main] cvs 696 chdir: dir '/home/sc0rp' 62 160106 [main] cvs 696 chdir: 0 = chdir() cygheap->cwd.posix '/test/prj' native 'c:\cygwin\test\prj' 61 160167 [main] cvs 696 fchdir: 0 = fchdir (6) The bug is that an fchdir does a chdir to the Windows path, which gets mapped to the wrong Posix path. 67 196039 [main] cvs 696 open: open (CVS/Entries, 0x0) 62 196101 [main] cvs 696 normalize_posix_path: src CVS/Entries 60 196161 [main] cvs 696 cwdstuff::get: posix /test/prj This time CVS/Entries is opened in binary mode and the filename is read with a final \r The fix is easy. I am wondering why the bug is not exposed in 1.5.9 Care to strace it? Pierre -- 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/