Mail Archives: cygwin/2005/07/22/15:58:42
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 -