delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/22/15:58:42

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 <ebb9 AT byu DOT net>
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: <loom.20050722T214303-629@post.gmane.org>
References: <auto-000001135296 AT apollos DOT syrres DOT com>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes

Victor Atkinson <atkinson <at> 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019