This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

1.7.35 Bash spawned by Perl has DOS-style argv0


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.

The first script displays $argv0 correctly in Unix style and runs a
Perl program.
The second script, a Perl program displays its $argv0 correctly in
Unix style, and executes a script in a Bash shell.
The third script displays its $argv0 and exits. This is where the
problem happens: its $argv0 is DOS style, and breaks Gnu Autotools

First, here is the output:

$ ./
I have set argv0 to and 0 to ./
This is Bash version 4.3.33(1)-release
Now running Perl...
My absolute path is: /home/John/cygtest/
Now to run Bash again, and view its argv...
After execution from Perl, I have set argv0 to
 and 0 to C:\cygwin64\home\John\cygtest\
This is Bash Version 4.3.33(1)-release.

Here are the three programs. You can download them in a tarball here:

   Filename 1:

echo "I have set argv0 to ${argv0} and 0 to ${0}"
echo "This is Bash version ${BASH_VERSION}"
echo "Now running Perl..."

   Filename 2:

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 ("./");

   Filename 3:

echo "After execution from Perl, I have set argv0 to ${argv0} and 0 to ${0}"
echo "This is Bash version ${BASH_VERSION}"

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?

Thank you for reading this.

Attachment: cygcheck.out
Description: Binary data

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]