rset fd flags only if close_on_exec2 is enabled