use O_CLOEXEC whenever we use open()