[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16444: bug #16444: grep -r fails with "Bad file descriptor" for ming

From: Paul Jackson
Subject: bug#16444: bug #16444: grep -r fails with "Bad file descriptor" for mingw-w64
Date: Wed, 11 Mar 2015 19:23:03 -0500

Norihiro Tanaka wrote:
>> So if we compare the file path instead of st_ino, the bug may be fixed.

Or perhaps compare st_ino if it's non-zero, else compare path.

# define IS_SPECIAL_MinGW_Case(a) ((a).st_.ino == 0)

# define SAME_INODE(a, b)    \
    (IS_SPECIAL_MinGW_Case(a) ? \
            paths_compare_equal((a), (b)) : \
            (a).st_ino == (b).st_ino ) \
     && (a).st_dev == (b).st_dev)

Inode number compare works well when supported, and has different semantics
(such as in handling of hard links) in some cases, which semantics should not be
changed, in my view.  MinGW needs to be "quarantined" in this circumstance,
which is what the test for a non-zero inode would (apparently, from what you 

In other words, our special handling for MinGW should not alter how we handle
everyone else.

                Paul Jackson

reply via email to

[Prev in Thread] Current Thread [Next in Thread]