delorie.com/archives/browse.cgi | search |
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:message-id:date:from:mime-version:to:subject | |
:references:in-reply-to:content-type; q=dns; s=default; b=gcZgoB | |
muY8/RrbrKb1gBN9zbsbBgn5BX9Vw5e6WAWm5TRvgZHUdqV6k/k0LoZBi6PR9zDe | |
7KC6IPeDVv1UeFZVSDqm8T6y3rtLrWH/5GCgzkMe1wv8wXF1RTIigir5g6hpvpv7 | |
puIjz2viE2nN/lTC940Qt/M1Ny91NBpnsFakM= | |
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:message-id:date:from:mime-version:to:subject | |
:references:in-reply-to:content-type; s=default; bh=XhdjMihrHYtC | |
ntTkxOUYbUb4ysc=; b=W8vwJguItaEBM9ZMEi1Pf9kJp3xyWRy75FUJTTvD6UwF | |
lSrWxRbEJG1pkzJ6ARHalBJ7ry4znpATbG0ssMh35Iv+eumQ2KZ1JB35JDYjiWWV | |
QFlIIei5Dv0e/vkK29xIYA2fi6FGUcH9YI5HEhXdyfFyF2yjvF7COOVVq1OEUZU= | |
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=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 |
X-HELO: | mx1.redhat.com |
Message-ID: | <54DA411E.3040700@redhat.com> |
Date: | Tue, 10 Feb 2015 10:34:22 -0700 |
From: | Eric Blake <eblake AT redhat DOT com> |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: /dev/tty does not work from shell |
References: | <54DA31C1 DOT 9060406 AT redhat DOT com> <54DA32D9 DOT 5070909 AT redhat DOT com> <20150210174647 DOT 7760EAC0 DOT helmut DOT karlowski AT ish DOT de> |
In-Reply-To: | <20150210174647.7760EAC0.helmut.karlowski@ish.de> |
OpenPGP: | url=http://people.redhat.com/eblake/eblake.gpg |
X-IsSubscribed: | yes |
--j3RFLUd1au56tQSFasGERiJKExLOARMsU Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > Don't know why, but cygwin is not the only OS that does that. I'd=20 > suggest to check for terminal or something. Umm, what other OS changes the inode from what you called stat() on to what you open()d? Okay, there are some special device files like /dev/ptmx that intentionally create a new device (and therefore new inode) every time it is opened, but is /dev/tty in that boat? POSIX requires /dev/tty to resolve to the process's controlling terminal. If there _are_ other OS that change the inode of the fd returned by opening /dev/tty, that argues that any change in bash to special-case /dev/tty should be made upstream, so I'm reluctant to write a cygwin-specific bash patch. If there aren't other OS that change the inode of /dev/tty, then it's better to figure out how to patch cygwin1.dll to be more like Linux. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --j3RFLUd1au56tQSFasGERiJKExLOARMsU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU2kEeAAoJEKeha0olJ0NqaIQH/14G18FG1g395V3m822WuRhF bq+ydlu5tAp9Mhuzo42lep0XJv02RSg4Aqp1An2XlkohCiZPh5fRUqv/Welr3etF vFUvAX8inIVsOXfYsLjlVo4lX2Zb1uP/rANuaMrj9ImfFzabD4XV4NlDGMkhGrBr 9PDGec3twI2DYRS1LqNlOBcdk/iWUX9Q1lr8C8WiRGJHHUxl9stCfFVtQnHHn9OW I0b3s9O800+8/dnAh1JIQ1KfLEqS7GIscDi3qdQxW9lS0zzHRzygtpU/LG1eN15u obyNK5Mw9ZKG6ZngAvqfgkDPIf3iKQx/pl7Ps1qKTXFzI9ETKjBz5EVlxE0lrwA= =PW9G -----END PGP SIGNATURE----- --j3RFLUd1au56tQSFasGERiJKExLOARMsU--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |