1.7.35 Bash spawned by Perl has DOS-style argv0

Corinna Vinschen corinna-cygwin@cygwin.com
Sun Feb 15 09:37:00 GMT 2015

On Feb 14 14:23, John Warburton wrote:
> Hello,
> After upgrading my installation from about two months ago to 1.7.35, a
> Bash shell opened by Perl (as used in Gnu Autotools) now sees
> DOS-style paths in its $argv0 variable instead of Unix-style paths
> and, consequently, errors occur. Before I upgraded my installation,
> everything was fine.
> Here is a simple test case I have written.
> [...]
>    Filename 2: perlpath.pl
> use Cwd 'abs_path';
> print "My absolute path is: ";
> print abs_path($0);
> print "\n";
> print "Now to run Bash again, and view its argv...\n";
> system ("./pathtest_2.sh");
>    Filename 3: pathtest_2.sh
> argv0=${0##*/}
> echo "After execution from Perl, I have set argv0 to ${argv0} and 0 to ${0}"
> echo "This is Bash version ${BASH_VERSION}"

Thanks for the testcase!  The problem you're describing is the result of
a thinko when I revamped the PATH finding functionality in Cygwin a
couple of days ago.  I fixed that in CVS.  I will upload a new developer
snapshot for testing to https://cygwin.com/snapshots/ later today.

> Is anyone else experiencing this? Are there any ways to force Bash
> shells run from Cygwin Perl to see Unix style paths, especially when
> Perl itself reports a Unix style path?

You *did* notice that 1.7.35 is a *test* release, did you?

Fortunately you actually tested it before it was released :)

The actual official stable release is 1.7.34, and it's of course
not affected by this problem.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150215/30654be3/attachment.sig>

More information about the Cygwin mailing list