On 11/11/2011 01:37 PM, Jim Meyering wrote: > + /* Do not test things that are likely to change in a growing file. */ \ > + /* && (s)->st_size == (t)->st_size */ \ > + /* && (s)->st_mtime == (t)->st_mtime */ \ > && (s)->st_ctime == (t)->st_ctime)
st_ctime is also likely to change in a growing file, at least it did in my test case on Fedora 15. And once we drop st_ctime, the rationale for same_file_attributes is suspect, as it's quite likely for all the other attributes to be the same. The simplest fix is to drop same_file_attributes and SAME_REGULAR_FILE, and for grepfile to invoke SAME_INODE rather than SAME_REGULAR_FILE. This should work fine on POSIXish hosts, and people running on Microsoftish hosts will just have to be careful to not have grep output into its input file.
