} if (__darwintrace_fd >= 0) { int size = snprintf(__darwintrace_buf, BUFFER_SIZE, "open\t%s\n", path );
int open(const char* path, int flags, ...) {#define open(x,y,z) syscall(SYS_open, (x), (y), (z))	mode_t mode;	int result;		va_list args;	va_start(args, flags);	mode = va_arg(args, int);	va_end(args);	result = open(path, flags, mode);	if (result >= 0 && (flags & (O_CREAT | O_WRONLY /*O_RDWR*/)) == 0 ) {		if (__darwintrace_fd == -2) {		  char* path = getenv("DARWINTRACE_LOG");		  if (path != NULL) {			__darwintrace_fd = open(path,			O_CREAT | O_WRONLY | O_APPEND,			0666);			fcntl(__darwintrace_fd, F_SETFD, 1); /* close-on-exec */		  }		}		if (__darwintrace_fd >= 0) {		  int size = snprintf(__darwintrace_buf, BUFFER_SIZE, "open\t%s\n", path );		  write(__darwintrace_fd, __darwintrace_buf, size);		  fsync(__darwintrace_fd);		}	}	return result;}