delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/13/09:57:57

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
To: cygwin AT cygwin DOT com
Subject: Re: stderr ?= stdout
Mail-Copies-To: never
Reply-To: sds AT gnu DOT org
X-Attribution: Sam
X-Disclaimer: You should not expect anyone to agree with me.
From: Sam Steingold <sds AT gnu DOT org>
In-Reply-To: <20050113101341.GT23702@cygbert.vinschen.de> (Corinna Vinschen's message of "Thu, 13 Jan 2005 11:13:41 +0100")
References: <u1xcq2ym9 DOT fsf AT gnu DOT org> <20050113101341 DOT GT23702 AT cygbert DOT vinschen DOT de>
Mail-Followup-To: cygwin AT cygwin DOT com
Date: Thu, 13 Jan 2005 09:55:23 -0500
Message-ID: <u3bx51iqs.fsf@gnu.org>
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (windows-nt)
MIME-Version: 1.0

> * Corinna Vinschen <pbevaan-pltjva AT pltjva DOT 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/

- Raw text -


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