delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/02/10/13:34:24

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=npFsjas+DIRgBRxAZV
AkUjad95C7emosMCLB6CFy1ywVH38TOKpBKnA9GWAGBBq0ylyI+br/uGn9cCRDku
3erpCB2mlpyRVGbi05jcO80J34PImPlgYgePl0oQjNcpEf1tDGl2OspYUUzvtzP0
SO6OlssvE4ruWf2Plo4YUeJOM=
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=fLPn53d6Y2xj9Br46v/2bafn
M90=; b=YjIsBsAStB6LtsiomjKCiedsAf0VbXsvIPrAf62HG01/c0229GFg4SPP
nRwjpWe93hAqEDUFaWC5yG3Bx5a4O7m3T5ZJWbcsCiVwAyTzFkGLXl4n2pLR9zSi
Sr2GmqGD9hE6mPuHATpoVfSExC8WH51I2O6ERP/AuauHIFGzvxg=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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.6 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 <helmut DOT karlowski AT ish DOT de>
To: cygwin AT cygwin DOT com
Subject: Re: /dev/tty does not work from shell
In-Reply-To: <20150210190451.CC914740.helmut.karlowski@ish.de>
References: <54DA411E DOT 3040700 AT redhat DOT com> <20150210190451 DOT CC914740 DOT helmut DOT karlowski AT ish DOT de>
Date: Tue, 10 Feb 2015 19:31:42 +0100
Message-Id: <20150210193142.16499318.helmut.karlowski@ish.de>
MIME-Version: 1.0
X-IsSubscribed: yes

--------------------------------------------------
Helmut Karlowski <helmut DOT karlowski AT ish DOT de> wrote:
(10/02/2015 19:04)

> 
> --------------------------------------------------
> Eric Blake <eblake AT redhat DOT com> wrote:
> (10/02/2015 18:34)
> 
> > On 02/10/2015 09:46 AM, Helmut Karlowski wrote:
> > >> 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.
> > 
> > Umm, what other OS changes the inode from what you called stat() on to
> 
> Well, I tested again and found that the inode only changes when I do 
> this in bash:
> 
> ksh:
> 675|/home/root}stat -c %i /tmp/tty - 0>/tmp/tty
> 835940
> 835940
> 676|/home/root}bash
> root AT IRAC root # stat -c %i /dev/tty - 0>/dev/tty
> 713246
> 80052544

Ok, messed up the test. For /dev/tty it's the same for both shells and
both OS. I looked it up in MiNT, and found ino is an internal pointer 
with no meaning to the outside.

If it's legal to look up the inode of a device, then both OS should be
fixed I think.

-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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019