From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14375 invoked by alias); 20 Jan 2017 21:19:25 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 14279 invoked by uid 89); 20 Jan 2017 21:19:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-HELO: nm1-vm10.bullet.mail.gq1.yahoo.com Received: from nm1-vm10.bullet.mail.gq1.yahoo.com (HELO nm1-vm10.bullet.mail.gq1.yahoo.com) (98.136.218.89) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Jan 2017 21:19:12 +0000 Received: from [216.39.60.184] by nm1.bullet.mail.gq1.yahoo.com with NNFMP; 20 Jan 2017 21:19:11 -0000 Received: from [98.137.12.239] by tm20.bullet.mail.gq1.yahoo.com with NNFMP; 20 Jan 2017 21:19:11 -0000 Received: from [127.0.0.1] by omp1047.mail.gq1.yahoo.com with NNFMP; 20 Jan 2017 21:19:11 -0000 Received: from jws300074.mail.gq1.yahoo.com by sendmailws110.mail.gq1.yahoo.com; Fri, 20 Jan 2017 21:19:10 +0000; 1484947150.589 Date: Fri, 20 Jan 2017 21:19:00 -0000 From: "Emember MemberUS via cygwin" Reply-To: Emember MemberUS Reply-To: Emember MemberUS To: "cygwin@cygwin.com" Message-ID: <1678300909.1030872.1484947150343@mail.yahoo.com> In-Reply-To: <2145564667.803491.1484839522957@mail.yahoo.com> References: <2145564667.803491.1484839522957.ref@mail.yahoo.com> <2145564667.803491.1484839522957@mail.yahoo.com> Subject: Re: mintty fails to start MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-01/txt/msg00273.txt.bz2 ----- Original Message ----- From: Emember MemberUS To: "cygwin@cygwin.com" 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 above with 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