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

From: Eric Blake <[email-masked]>
Date: Wed, 11 Feb 2015 17:25:42 -0700

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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org