Skip to content

Commit

Permalink
Kernel: Don't seek the program executable description in sys$execve()
Browse files Browse the repository at this point in the history
The dynamic loader doesn't care if the kernel has moved the file
cursor around before it gains control.
  • Loading branch information
awesomekling committed Sep 6, 2021
1 parent f4624e4 commit e226400
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Kernel/Syscalls/execve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e226400

Please sign in to comment.