Re:Shebang Quine
by Tyr42 on Friday May 20, 2016 @10:55AM
(#11738295)
I don't think so either. It's something in the implementation of `execv` I think.
Is sufficient to have this work.
[ Parent
| on HN ]
An entire generation of programmer has grown up not knowing that this is implemented in the kernel.
I remember being surprised by this and then realising, "wait, of course it's in the kernel -- that's so much nicer from a usability and sanity standpoint".
It's implemented in the kernel. Look at fs/binfmt_script.c in the Linux kernel source tree for an example.
Someone linked to it on reddit: https://www.reddit.com/r/programming/comments/4k7gvh/shebang...