serenity/Kernel
Jelle Raaijmakers 30abfc2b21 Kernel: Pass absolute path to shebang interpreter
When you invoke a binary with a shebang line, the `execve` syscall
makes sure to pass along command line arguments to the shebang
interpreter including the path to the binary to execute.

This does not work well when the binary lives in $PATH. For example,
given this script living in `/usr/local/bin/my-script`:

  #!/bin/my-interpreter
  echo "well hello friends"

When executing it as `my-script` from outside `/usr/local/bin/`, it is
executed as `/bin/my-interpreter my-script`. To make sure that the
interpreter can find the binary to execute, we need to replace the
first argument with an absolute path to the binary, so that the
resulting command is:

  /bin/my-interpreter /usr/local/bin/my-script
2021-06-13 21:19:51 +02:00
..
ACPI
API
Arch
Devices
FileSystem
Graphics
Heap
Interrupts
Modules
Net
PCI
Storage
Syscalls
Tasks
Time
TTY
VirtIO
VM
AddressSanitizer.cpp
AddressSanitizer.h
Assertions.h
CMakeLists.txt
CMOS.cpp
CMOS.h
CommandLine.cpp
CommandLine.h
ConsoleDevice.cpp
ConsoleDevice.h
CoreDump.cpp
CoreDump.h
Debug.h.in
DMI.cpp
DMI.h
DoubleBuffer.cpp
DoubleBuffer.h
Forward.h
FutexQueue.cpp
FutexQueue.h
init.cpp
IO.h
KBuffer.h
KBufferBuilder.cpp
KBufferBuilder.h
kprintf.cpp
KResult.h
kstdio.h
KString.cpp
KString.h
KSyms.cpp
KSyms.h
linker.ld
Lock.cpp
Lock.h
LockMode.h
mkmap.sh
Module.h
Multiboot.h
Panic.cpp
Panic.h
PerformanceEventBuffer.cpp
PerformanceEventBuffer.h
PerformanceManager.h
PhysicalAddress.h
Process.cpp
Process.h
ProcessGroup.cpp
ProcessGroup.h
Random.cpp
Random.h
RTC.cpp
RTC.h
Scheduler.cpp
Scheduler.h
SpinLock.h
StdLib.cpp
StdLib.h
Syscall.cpp
Thread.cpp
Thread.h
ThreadBlockers.cpp
ThreadTracer.cpp
ThreadTracer.h
TimerQueue.cpp
TimerQueue.h
UBSanitizer.cpp
UnixTypes.h
UnveilNode.h
UserOrKernelBuffer.cpp
UserOrKernelBuffer.h
VirtualAddress.h
WaitQueue.cpp
WaitQueue.h
WorkQueue.cpp
WorkQueue.h