Replace creat()/fd_set_close_on_exec() with a single open().
Per the creat() man page, creat() is equivalent to calling open with flags of O_CREAT|O_WRONLY|O_TRUNC. Add O_CLOEXEC as well.
Please register or sign in to comment
Per the creat() man page, creat() is equivalent to calling open with flags of O_CREAT|O_WRONLY|O_TRUNC. Add O_CLOEXEC as well.