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:from:to:subject:content-type :content-transfer-encoding:in-reply-to:references:date :message-id:mime-version; q=dns; s=default; b=TG3fKqlj3ZQaIZoHn3 oSOTIIf03nHoA2fVnZ8QAWM8X14cUPUz9ZAFLGyBaO4VGwWMe3yHpcXWnBL4za6I vtoHdU9V4tVSXkWltWBQ7QHbiE4VzeeKEcuYgF+qkfJ/QHdY9rTMBbUx9hMjnim7 I8IQn72Bc/EGZKFKrH/UXtq9k= 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:from:to:subject:content-type :content-transfer-encoding:in-reply-to:references:date :message-id:mime-version; s=default; bh=PsXkJ34a2xHrY5nQkaSMsWlD tqc=; b=t2amt9jxIb1yvNwaFVxVuDhVPN/ji3I42TO3q2UxRhkLMFkYtfqoZbVQ q/qSiWiuoAtgwB1AyKc03OZx7h3WpYQYuEhHVm6JvzYQGv/Dv+3YM9CdR22WL/W1 gaIfoc3XCJtqnEUoNzTbmbvJz3iSmonCp0UG3OkPTwWdaS9/uOw= 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-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailout.ish.de X-Spam-Score: -0.01 From: Helmut Karlowski To: cygwin AT cygwin DOT com Subject: Re: /dev/tty does not work from shell Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <54DA32D9.5070909@redhat.com> References: <54DA31C1 DOT 9060406 AT redhat DOT com> <54DA32D9 DOT 5070909 AT redhat DOT com> Date: Tue, 10 Feb 2015 17:46:47 +0100 Message-Id: <20150210174647.7760EAC0.helmut.karlowski@ish.de> MIME-Version: 1.0 X-IsSubscribed: yes -------------------------------------------------- Eric Blake wrote: (10/02/2015 17:33) > On 02/10/2015 09:28 AM, Eric Blake wrote: > > > > The bug is in cygwin1.dll, not bash. Here's a STC; opening a file > > should NOT change its st_ino number, but that's exactly what cygwin is > > doing to /dev/tty. As such, bash thinks that because the ino changed > > between stat() and open() that there is a race of someone trying to do > > bad things behind bash's back, and noclobber restrictions kick in to > > prevent bash from using the file. > > The same test from the command line: > > $ stat -c %i /dev/tty - 0>/dev/tty > 327680 > 8912896 > > use any other (already-existing) file to see that the two numbers should > normally be the same. Don't know why, but cygwin is not the only OS that does that. I'd suggest to check for terminal or something. -Helmut -- 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