Kernel: Support passing arguments in shebangged scripts

Add the ability to both pass arguments to scripts with shebangs
(./script argument1 argument2) and to specify them in the shebang line
(#!/usr/local/bin/bash -x -e)

Fixes #585
This commit is contained in:
Karol Baraniecki 2019-10-27 10:42:07 +01:00 committed by Andreas Kling
commit 9131134704
Notes: sideshowbarker 2024-07-19 11:30:56 +09:00
2 changed files with 34 additions and 8 deletions

View file

@ -318,7 +318,7 @@ private:
int alloc_fd(int first_candidate_fd = 0);
void disown_all_shared_buffers();
KResultOr<String> find_shebang_interpreter_for_executable(const String& executable_path);
KResultOr<Vector<String>> find_shebang_interpreter_for_executable(const String& executable_path);
Thread* m_main_thread { nullptr };