Subject: bug#19509: [bug-diffutils] bug#19509: bug#19509: bug#19509: [PATCH] diff: treat fifos as identical

From: Jim Meyering <[email-masked]>
Date: Fri, 5 May 2017 09:40:12 -0700

close 19509
tags 19509 notabug
thanks

On Wed, Feb 11, 2015 at 8:22 PM, Ondřej Svoboda <[email-masked]> wrote:
> Thank you, Eric!
>
> I will try it out.
>
>
> On 12.2.2015 01:25, Eric Blake wrote:
>>
>> On 02/11/2015 04:37 PM, Ondřej Svoboda wrote:
>>>
>>> I also posed this question to myself -- how can we tell two fifos apart?
>>> Do they by any chance store e.g. a file descriptor when they are being
>>> used?
>>>
>>> I am not aware of any comparison done to fifos but I may as well be
>>> wrong.
>>
>> fstat() will tell you if two fds are the same fifo - their st_dev and
>> st_ino will be equal.

As far as I can see, diff already does the right thing: If the two
fifos are the same dev/ino, it doesn't even read them and exits 0.
Otherwise, it reads each and compares, just as for other types of files.

I'm marking this auto-created issue as "done", and "notabug", but feel
free to comment here.