bug-gnulib
[Top][All Lists]
Advanced

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

Re: MS-Windows build of Grep [2/4]


From: Paul Eggert
Subject: Re: MS-Windows build of Grep [2/4]
Date: Fri, 30 Dec 2011 14:27:17 -0800
User-agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0

On 12/30/11 07:43, Jim Meyering wrote:
> Without useful stat.st_ino, there are some important tasks (e.g., dir
> traversal) that simply cannot be performed safely/reliably.

In general that's true, and on further thought I agree
we should leave that part of grep's st_ino code alone.
I proposed that change only because
POSIX says a zero st_ino value is valid, and I wanted grep
to detect loops properly on a POSIX host that does that.
But practice nobody ever does this for directories, and until
they do it's more important to deal with actual Microsoft
squirreliness than with hypothetical POSIX strictness.

Maybe POSIX should get changed to require nonzero st_ino values?
That would mean the current 'grep' code would be portable
in theory....

While looking into this I noticed another porting issue: grep
silently mishandles recursive directory loops on OpenVMS.
The fix should be very simple.  I'll start a new thread for that.



reply via email to

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