mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:07:43 +00:00
Kernel: Make FileDescription::seek() return KResultOr<off_t>
This exposed a bunch of places where errors were not propagated, so this patch is forced to deal with them as well.
This commit is contained in:
parent
ed1789cc04
commit
d48666489c
6 changed files with 37 additions and 24 deletions
|
@ -559,7 +559,8 @@ KResult Process::do_exec(NonnullRefPtr<FileDescription> main_program_description
|
|||
if (interpreter_description) {
|
||||
main_program_fd = alloc_fd();
|
||||
VERIFY(main_program_fd >= 0);
|
||||
main_program_description->seek(0, SEEK_SET);
|
||||
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].set(move(main_program_description), FD_CLOEXEC);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue