This is the mail archive of the
mailing list for the Cygwin project.
Re: /dev/tty does not work from shell
- From: Helmut Karlowski <helmut dot karlowski at ish dot de>
- To: cygwin at cygwin dot com
- Date: Tue, 10 Feb 2015 19:04:51 +0100
- Subject: Re: /dev/tty does not work from shell
- Authentication-results: sourceware.org; auth=none
- References: <20150210174647 dot 7760EAC0 dot helmut dot karlowski at ish dot de> <54DA411E dot 3040700 at redhat dot com>
Eric Blake <email@example.com> wrote:
> 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:
675|/home/root}stat -c %i /tmp/tty - 0>/tmp/tty
root@IRAC root # stat -c %i /dev/tty - 0>/dev/tty
Ths OS is MiNT.
On cygwin in both cases the inode changes.
Again: I would not use the inode of a special file at all.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple