public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Houder <houder@xs4all.nl>
To: cygwin@cygwin.com
Subject: Re: Pipes Again. (was: cmp (or echo) bug?) -- more correction
Date: Sun, 03 Jan 2016 22:47:00 -0000	[thread overview]
Message-ID: <6e92b2c8a1a07d61a6d6832d289b1087@xs4all.nl> (raw)
In-Reply-To: <a33618ac83154dae265bb9906dd966e0@xs4all.nl>

On 2016-01-02 12:58, Houder wrote:

> Cygwin shows:
> @@ ./t_stat <(echo foo) <(echo bar)
> ... arg = /dev/fd/63
> File type:                FIFO or pipe
> Device containing i-node: (c6)   major=0   minor=198
> I-node number:            0 - decimal: 0
> ... arg = /dev/fd/62
> File type:                FIFO or pipe
> Device containing i-node: (c6)   major=0   minor=198
> I-node number:            0 - decimal: 0
> fd[0] = 3, fd[1] = 3
> 
> And sometimes, especially in case close(fd[f]) is NOT present ...
> 
> @@ ./t_stat <(echo foo) <(echo bar)
> ... arg = /dev/fd/63
> File type:                FIFO or pipe
> Device containing i-node: (c6)   major=0   minor=198
> I-node number:            0 - decimal: 0
> ... arg = /dev/fd/62
> File type:                FIFO or pipe
> Device containing i-node: (c6)   major=0   minor=198
> I-node number:            5c443bd7b7e540 - decimal: 25970721670292800
> fd[0] = 3, fd[1] = 4
> 
>  - Cygwin shows 198 for st_dev in case fstat() is used
>  - Cygwin shows 199 for st_dev in case stat() is used
>  - Cygwin shows 197 for st_dev in case fstat() is used and in case the 
> command
>    reads as follows:
> @@ ./t_stat >(cat > a) >(cat > b) # yes, the opposite case - had to try
> 
>  - Cygwin nearly always shows ZERO for both st_ino-s (same call); 
> however, if
>    one of the st_ino-s is NOT zero, Cygwin always shows the same value:
> I-node number:            5c443bd7b7e540 - decimal: 25970721670292800

Should be read:

  - Cygwin nearly always shows ZERO ... etc., etc. in case of fstat() 
!!!!!
  - Cygwin always shows different values for both st_ino-s (same call) in 
case of
    stat(); values that are different from the ones in subsequent calls

Sorry,
Henri

> Bottom-line:
> 
>  - instrumenting cmp with the same "diagnostics", yields the same 
> result
>  - cmp fails on Cygwin, because Cygwin returns both st_ino-s as equal 
> (zero).
> 
> My reason for posting this, is to help others in case they stumble over 
> this
> weird behaviour of Cygwin.

=====

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

      parent reply	other threads:[~2016-01-03 22:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-02 11:58 Pipes Again. (was: cmp (or echo) bug?) Houder
2016-01-02 12:17 ` Pipes Again. (was: cmp (or echo) bug?) -- typo corrected Houder
2016-01-03 22:47 ` Houder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e92b2c8a1a07d61a6d6832d289b1087@xs4all.nl \
    --to=houder@xs4all.nl \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).