On Thu, 15 Mar 2012, James Youngman wrote:
I guess I'm also interested in whether, as built on your machine, GNU find is using openat() natively or via gnulib's emulation. And, whether that version of Solaris actually has openat.
To answer your specific question; yes, GNU find is using native openat(). $ grep openat= config.log ac_cv_func_openat=yes ac_cv_have_decl_openat=yes gl_cv_have_raw_decl_openat=yesI see calls to openat64() in the truss output (attached), and there is manpage documentation for openat(2).
Some more comparisons: version action syscalls find-4.5.10 -printf '%M %u %g %p\n' 2652 oldfind-4.5.10 -printf '%M %u %g %p\n 2656 find-4.5.10 -ls 957 oldfind-4.5.10 -ls 961 /usr/bin/find -ls 906The oddity now is that GNU find behaves comparably to Solaris find for -ls, but incurs some severe overhead for -printf, which outputs fewer metadata.
I've attached the output of several traced executions, including libc calls. Note on Solaris that "truss -u libc: ..." records only external calls into libc, not libc's internal calls to itself.
Cheers, Phil
find-truss.txt.gz
Description: GNU Zip compressed data
