Web lists-archives.com

Re: mintty fails to start







----- Original Message -----
From: Emember MemberUS <ememberus@xxxxxxxxx>
To: "cygwin@xxxxxxxxxx" <cygwin@xxxxxxxxxx>
Sent: Thursday, January 19, 2017 10:25 AM
Subject: mintty fails to start

This is a minor issue and probably not typical, but could be of interest to cygwin developers/maintainers.

Problem: 
After building a 3-party cross-toolchain (unrelated to cygwin), mintty is no longer able to start.
While a few mintty windows that were still open worked ok, any NEW mintty window just flashed and immediately closed itself. 

Solution: 
Re-installation of cygwin from scratch is undesirable because current installation already has multiple customizations. 
Initial research yielded nothing - no error message, or hint of any kind, and discussion forums offered no clue either. 
The cause of the issue happened to be an empty file /bin/bash. It is currently unclear where it came from (could be a side 
effect of a build), but it is not part of standard cygwin installation. Once this empty file is deleted, mintty is able to start again. 


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.


    ... 

    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.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple