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: Pipes Again. (was: cmp (or echo) bug?) -- more correction


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


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