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 To: cygwin AT cygwin DOT com From: Eric Blake Subject: Re: Bash behavior change 2.05b-17 vs 2.05b-16 Date: Fri, 22 Jul 2005 19:57:41 +0000 (UTC) Lines: 41 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Victor Atkinson syrres.com> writes: > > Greetings, > > I recently updated my Cygwin installation from version 1.5.11-1 to 1.5.17-1. > As I did so, I also updated all of my packages, including updating Bash from > version 2.05b-16 to version 2.05b-17. As long as you are upgrading, why not go all the way to cygwin-1.5.18-1 and bash-3.0-8? > > After updating, a Bash script that I use for backing up my computer using > WinZip failed to operate. After some debugging, I concluded that the > behavior of Bash when calling the WinZip command-line executable had > changed. Specifically, the treatment of the backslash '\' when launching > executables seems to have changed. Version 2.05b-17 seems to no longer > accept '\' in the path name of an executable, even when protected or > escaped. > Are you sure it was bash and not cygwin that changed behavior? Bash should not do anything special with backslash; it passes filenames to cygwin as they were typed. Maybe it was cygwin's behavior of \ handling in converting POSIX paths back to Windows paths, particularly in the exec*() family of calls, that changed. However, I noticed that when doing "strace bash -c c:\\\\winnt\\\\system32\\\\notepad.exe" (double quoting, since one level is stripped before strace, the other is stripped by the bash being traced) that bash treats c:\winnt\system32\notepad.exe as a relative path rather than absolute, and tries to prepend PATH entries to it. My solution - DON'T USE BACKSLASHES in cygwin if you can help it. Cygwin understands forward slash, and provides /cygdrive/c, so you might as well use them. Besides, cygpath(1) is there to help you convert between Windows and POSIX path names. -- Eric Blake volunteer cygwin bash maintainer -- 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/