nuta / kerla

A new operating system kernel with Linux binary compatibility written in Rust.
Other
3.35k stars 87 forks source link

Fix argument passing to scripts being interpreted with '#!' shebang lines #167

Closed anholt closed 1 month ago

anholt commented 1 month ago

Description

I refactored script vs ELF handling as part of some ELF loading work I was doing, and it revealed that we were ignoring the original argv[] of a script that got interpreted based on its '#!' line. Add an integration test that passed on Linux and failed on kerla, and fix the bug.

Pre-Submission Checklist

When you submit a PR, please make sure your PR satisfies the following checklist: