r/ProgrammerHumor • • Nov 06 '20

Meme Totally agree

Post image
52.1k Upvotes

474 comments sorted by

View all comments

Show parent comments

30

u/ericonr Nov 06 '20

It's actually the kernel :p

26

u/moochacho1418 Nov 07 '20

You’re a kernel

2

u/oezingle Nov 06 '20 edited Nov 06 '20

Doesn’t GNU bash read that for the kernel?

Edit:

The loader executes the specified interpreter program, passing to it as an argument the path that was initially used when attempting to run the script, so that the program may use the file as input data.

  • Wikipedia

So it does, because the loader runs through bash

15

u/ericonr Nov 07 '20

No it doesn't.

There are shells other than bash, and a program can directly use the execve(2) syscall on a file with a shebang without having to implement any sort of special parsing.

If you click the loader ( https://en.wikipedia.org/wiki/Loader_(computing) ) link in the quote you posted (without providing a link), you will see that the program loader is the handler for the execve system call, which means it's not something implemented in application code, but rather part of the syscall logic, which most of the time is implemented in the kernel.