Assaf Gordon wrote: > On 11/01/2014 10:39 PM, Paul Eggert wrote: > > Assaf Gordon wrote: > > >> $ ../../../src/grep -r '^' ; echo $? > >> a:a > >> b:b > >> ../../../src/grep: c: Inappropriate file type or format > >> ../../../src/grep: d: Inappropriate file type or format > >> ../../../src/grep: e: Inappropriate file type or format > >> 2 > > > > What system calls is this 'grep' executing? What's the output of ktrace and kdump? > > Attached is the ktrace+tdump output of running the command. > > The error appears on line 217 (open() returns -1 for file "c"), > though similar errors stemming from 'fstat' for files a,b are ignored (lines 150,191). > > - Assaf NetBSD returns errno == EFTYPE in open with O_NOFOLLOW for symlink instead of errno == ELOOP which POSIX says. Similarly, Tru64 returns errno == ENOTSUP. So I added them to ignorable list.