binfmt_misc
binfmt_misc
Posted Feb 21, 2019 8:24 UTC (Thu) by mm7323 (subscriber, #87386)Parent article: The case of the supersized shebang
Couldn't you just use binfmt_misc to match on #! and then run a process that can open up the script and figure out the required interpreter and arguments in userspace?
That should surely be possible for a distro that wants to do unusual things and only costs an extra exec() for starting up scripts which aren't known to be that fast anyway.