In article <20141126164843.5cdd...@cvs.netbsd.org>, Christos Zoulas <source-changes-d@NetBSD.org> wrote: >-=-=-=-=-=- > >Module Name: src >Committed By: christos >Date: Wed Nov 26 16:48:43 UTC 2014 > >Modified Files: > src/lib/libc/gen: opendir.c > >Log Message: >- Use O_DIRECTORY to open the file, so that we don't need to stat() after > that. >- Move the stat() call to fdopendir() and change it's error handling so that > it does not hide errors. >- According to POSIX, fdopendir() transfers ownership of the fd only on > success, so don't close it on failure. XXX: We still make it non-blocking > on failure, but that's nitpicking.
That should read close-on-exec... christos