X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:reply-to:to:message-id :in-reply-to:references:subject:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=b4CzWadOBO+BkFhe J/ToUoMiLAD8Er6xGevOc9gZUoVmpRGQ865KvcmPkHgDeIuc/uLVB3IbSh8dH2Zy 7Zb0Ts5pWlXtslGrWqnMOEfW3HdKM7VAkM5zY9geMpnSjNQCqnnxQKD9GiAOLcYk H2ZxdRi8Ra8VxINhLoCT7auSaXE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:reply-to:to:message-id :in-reply-to:references:subject:mime-version:content-type :content-transfer-encoding; s=default; bh=D13ESVCxC+rhN78y6ygYki C0YkY=; b=cOWtUVGVtjpXscPkjHjoUvdJ0xjZ0z2bUW62S9u5RvO6bpX6ZOU69s x9spZUEOXd/o75Swkz/PEiXp500cpaVsHWuKfL61zkBwsc3+lww7Dq9G8/PDhr3H 8KE1rrXjF+/y1i2cfrSrYJ/+sgnRDHIafCYUEPL7rbQEsE7Z4PORM= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-HELO: nm1-vm10.bullet.mail.gq1.yahoo.com Date: Fri, 20 Jan 2017 21:19:10 +0000 (UTC) From: "Emember MemberUS via cygwin" Reply-To: Emember MemberUS Reply-To: Emember MemberUS To: "cygwin AT cygwin DOT com" Message-ID: <1678300909.1030872.1484947150343@mail.yahoo.com> In-Reply-To: <2145564667.803491.1484839522957@mail.yahoo.com> References: <2145564667 DOT 803491 DOT 1484839522957 DOT ref AT mail DOT yahoo DOT com> <2145564667 DOT 803491 DOT 1484839522957 AT mail DOT yahoo DOT com> Subject: Re: mintty fails to start MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ----- Original Message ----- From: Emember MemberUS To: "cygwin AT cygwin DOT 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