1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:27:43 +00:00

More compat work towards porting vim.

It now builds and runs in the small-featureset configuration. :^)
This commit is contained in:
Andreas Kling 2019-02-27 00:02:01 +01:00
parent 424368034b
commit e421c10735
8 changed files with 44 additions and 5 deletions

View file

@ -313,7 +313,12 @@ int Process::do_exec(String path, Vector<String> arguments, Vector<String> envir
ProcessPagingScope paging_scope(*this);
auto vmo = VMObject::create_file_backed(descriptor->inode());
#if 0
// FIXME: I would like to do this, but it would instantiate all the damn inodes.
vmo->set_name(descriptor->absolute_path());
#else
vmo->set_name("ELF image");
#endif
RetainPtr<Region> region = allocate_region_with_vmo(LinearAddress(), descriptor->metadata().size, vmo.copy_ref(), 0, "executable", true, false);
// FIXME: Should we consider doing on-demand paging here? Is it actually useful?
@ -1547,6 +1552,7 @@ pid_t Process::sys$waitpid(pid_t waitee, int* wstatus, int options)
return reaped_pid;
} else {
ASSERT(waitee > 0); // FIXME: Implement other PID specs.
InterruptDisabler disabler;
auto* waitee_process = Process::from_pid(waitee);
if (!waitee_process)
return -ECHILD;
@ -1967,9 +1973,7 @@ int Process::sys$select(const Syscall::SC_select_params* params)
auto* timeout = params->timeout;
// FIXME: Implement exceptfds support.
//ASSERT(!exceptfds);
if (exceptfds)
kprintf("%s(%u): FIXME: select() with exceptfds\n", name().characters(), pid());
(void)exceptfds;
if (timeout) {
m_select_timeout = *timeout;
@ -2006,6 +2010,9 @@ int Process::sys$select(const Syscall::SC_select_params* params)
error = transfer_fds(readfds, m_select_read_fds);
if (error)
return error;
error = transfer_fds(readfds, m_select_exceptional_fds);
if (error)
return error;
#ifdef DEBUG_IO
dbgprintf("%s<%u> selecting on (read:%u, write:%u), wakeup_req:%u, timeout=%p\n", name().characters(), pid(), m_select_read_fds.size(), m_select_write_fds.size(), m_wakeup_requested, timeout);
@ -2047,6 +2054,8 @@ int Process::sys$select(const Syscall::SC_select_params* params)
}
}
// FIXME: Check for exceptional conditions.
return markedfds;
}