...
Suggestion: produce an error message that would help identifying this problem when mintty starts.
NOTE: this issue happens only in cygwin, and only when both files are present: /bin/bash.exe and empty /bin/bash.
If no bash is present, mintty issues a correct error message.
One interesting test case may be to remove the x bit from the empty bash file, to see that mintty handles invocation errors properly. The issue is that invocation of an empty file (provided that the x bit is set) is not considered an error in a Linux environment, and thus on cygwin, so the exec system call does not report an error in the first place.
There is nothing that can be done about it, the behaviour is correct.
------
Thomas
---------------------------------------------------------
Correction:
replace <produce an error message> above with <allow logging of exec call(s)>
Current behavior may be correct, but it makes cygwin vulnerable to such hard-to-detect configuration problems.