mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:08:12 +00:00
Kernel: Convert much of sys$execve() to using KString
Make use of the new FileDescription::try_serialize_absolute_path() to avoid String in favor of KString throughout much of sys$execve() and its helpers.
This commit is contained in:
parent
226383f45b
commit
dbd639a2d8
3 changed files with 20 additions and 22 deletions
|
@ -179,7 +179,7 @@ public:
|
|||
}
|
||||
|
||||
static RefPtr<Process> create_kernel_process(RefPtr<Thread>& first_thread, NonnullOwnPtr<KString> name, void (*entry)(void*), void* entry_data = nullptr, u32 affinity = THREAD_AFFINITY_DEFAULT, RegisterProcess do_register = RegisterProcess::Yes);
|
||||
static KResultOr<NonnullRefPtr<Process>> try_create_user_process(RefPtr<Thread>& first_thread, String const& path, UserID, GroupID, Vector<String> arguments, Vector<String> environment, TTY*);
|
||||
static KResultOr<NonnullRefPtr<Process>> try_create_user_process(RefPtr<Thread>& first_thread, StringView path, UserID, GroupID, Vector<String> arguments, Vector<String> environment, TTY*);
|
||||
static void register_new(Process&);
|
||||
|
||||
bool unref() const;
|
||||
|
@ -441,7 +441,7 @@ public:
|
|||
const Vector<String>& arguments() const { return m_arguments; };
|
||||
const Vector<String>& environment() const { return m_environment; };
|
||||
|
||||
KResult exec(String path, Vector<String> arguments, Vector<String> environment, int recusion_depth = 0);
|
||||
KResult exec(NonnullOwnPtr<KString> path, Vector<String> arguments, Vector<String> environment, int recusion_depth = 0);
|
||||
|
||||
KResultOr<LoadResult> load(NonnullRefPtr<FileDescription> main_program_description, RefPtr<FileDescription> interpreter_description, const ElfW(Ehdr) & main_program_header);
|
||||
|
||||
|
@ -538,7 +538,7 @@ private:
|
|||
|
||||
KResultOr<FlatPtr> do_statvfs(StringView path, statvfs* buf);
|
||||
|
||||
KResultOr<RefPtr<FileDescription>> find_elf_interpreter_for_executable(String const& path, ElfW(Ehdr) const& main_executable_header, size_t main_executable_header_size, size_t file_size);
|
||||
KResultOr<RefPtr<FileDescription>> find_elf_interpreter_for_executable(StringView path, ElfW(Ehdr) const& main_executable_header, size_t main_executable_header_size, size_t file_size);
|
||||
|
||||
KResult do_kill(Process&, int signal);
|
||||
KResult do_killpg(ProcessGroupID pgrp, int signal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue