http://bugs.winehq.org/show_bug.cgi?id=19801
Summary: cygwin can't run a batch file from inside a shell script without explicit cmd /c Product: Wine Version: 1.1.27 Platform: PC OS/Version: Linux Status: NEW Keywords: download Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
Given the batch file foo.bat containing echo FOO and the shell script 'foo.sh' containing ./foo.bat the command ./foo.bat interactively will output FOO on both cygwin/windows and cygwin/wine, but the command sh foo.sh will produce FOO on cygwin/windows but will fail on cygwin/wine saying foo.sh: line 1: ./foo.bat: permission denied
This happens both in an interactive cygwin shell started under wineconsole, as well as the naked command $ wine ~/.wine/drive_c/cygwin/bin/sh foo.sh
which sometimes says permission denied, and sometimes says "bad address", e.g.
foo.sh: line 1: ./foo.bat: Bad address 13 [main] sh 50! _cygtls::handle_exceptions: Error while dumping state (probably corrupted stack) foo.sh: line 1: 50 Segmentation fault (core dumped) ./foo.bat
So the "permission denied" error might be a symptom of a crash, too.
This was found while trying to automate the chrome and firefox build setup procedures.