This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: /dev/tty does not work from shell


Please, https://cygwin.com/acronyms/#PCYMTNQREAIYR

On Feb 10 19:31, Helmut Karlowski wrote:
> Helmut Karlowski <...> wrote:
> > Eric Blake <...> 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:
> > 
> > ksh:
> > 675|/home/root}stat -c %i /tmp/tty - 0>/tmp/tty
> > 835940
> > 835940
> > 676|/home/root}bash
> > root@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.

I applied a patch to Cygwin.  Please give the latest snapshots a try:
https://cygwin.com/snapshots/


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgp6O8UzI5T6P.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]