On Sun, Jan 5, 2020 at 10:42 PM Brian Walden <tuhs@cuzuco.com> wrote:
not the kernel. This had traditionally been done after the exec() failed
then shell ould run "sh argv[0]", but with two shells this was now a problem.

It seems the kernel did that; http://man.cat-v.org/unix_7th/2/exec since argv[-1] was altered.

I read somewhere, can't recall where, that Ken Thompson suggested "#!" being added to the kernel during his sabbatical there.