Don't use O_CLOEXEC, it maybe undefined. Rely on good-old fcntl FD_CLOEXEC