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: stderr ?= stdout


> * Corinna Vinschen <pbevaan-pltjva@pltjva.pbz> [2005-01-13 11:13:41 +0100]:
>
> On Jan 12 15:14, Sam Steingold wrote:
>> alas, the current cygwin reports different inodes for stdout and stderr:
>>   -437397064 and 593767114
>
> That looks suspicious.  Are you aware that ino_t is a 64 bit int?

oops, when I use "%llx" instead of "%d", I get
         dev     inode           mode nl  uid  gid   rdev size
stderr: 327681 2f61f5afe5edd9b8 8630 1 13044 10513 327681 0
stdout: 327681 7043214323642aca 8630 1 13044 10513 327681 0

>> so, what is the right way to check that two FDs refer to the
>> same device?
>
> You didn't tell which device stdout and stderr are connected to.
> Are you running this in a local console?

yes, this is a local console running under _bash_.

when running under pure w2k cmd, or under gdb started from bash,
or under gdb started from cmd, I get identical numbers:

stderr: 327681 2f61f5afe5edd9b8 8630 1 13044 10513 327681 0
stdout: 327681 2f61f5afe5edd9b8 8630 1 13044 10513 327681 0

(i.e., it appears that _stdout_ inode under bash is bad.)

when running under rxvt:

stderr: 8912896 134fb3e4ff2f823a 8630 1 13044 10513 8912896 0
stdout: 8912896 134fb3e4ff2f823a 8630 1 13044 10513 8912896 0

and under xterm

stderr: 8912896 134fb3e4ff2f823a 8630 1 13044 10513 8912896 0
stdout: 8912896 134fb3e4ff2f823a 8630 1 13044 10513 8912896 0

So, the only problem is stdout inode when running under bash.

thanks.


-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Rhinoceros has poor vision, but, due to his size, it's not his problem.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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