1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

Kernel: Don't seek the program executable description in sys$execve()

The dynamic loader doesn't care if the kernel has moved the file
cursor around before it gains control.
This commit is contained in:
Andreas Kling 2021-09-06 23:39:39 +02:00
parent f4624e4ee1
commit e226400dd8

View file

@ -527,8 +527,6 @@ KResult Process::do_exec(NonnullRefPtr<FileDescription> main_program_description
});
if (main_program_fd_allocation.has_value()) {
auto seek_result = main_program_description->seek(0, SEEK_SET);
VERIFY(!seek_result.is_error());
main_program_description->set_readable(true);
m_fds[main_program_fd_allocation->fd].set(move(main_program_description), FD_CLOEXEC);
}