diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index ac8492745d..e398259238 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -245,11 +245,8 @@ int Process::do_exec(NonnullRefPtr main_program_description, Ve for (size_t i = 0; i < m_fds.size(); ++i) { auto& description_and_flags = m_fds[i]; - if (description_and_flags.description() && description_and_flags.flags() & FD_CLOEXEC) { - // FIXME: Should this error path be observed somehow? - (void)description_and_flags.description()->close(); + if (description_and_flags.description() && description_and_flags.flags() & FD_CLOEXEC) description_and_flags = {}; - } } new_main_thread = nullptr;