Comment Re:Bull (Score 1) 830
It says I must fsync the directory, and nothing in Posix even says it's possible to open() or fsync() a directory; you have to use opendir().)
*Bzzt*
BigMac:~ james$ cat > open_dir.c
#include <fcntl.h>
int main() { return open(".", O_RDONLY); }
BigMac:~ james$ gcc -o open_dir open_dir.c
BigMac:~ james$
3
BigMac:~ james$ uname -a
Darwin BigMac.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386
The "Single Unix Specification" you mentioned says you can open() a directory with O_SEARCH, too. MacOS doesn't have that.
Either way, I expect you'll be able to fsync() that fd; that's all you need.