Hacker News new | ask | show | jobs
by cryptonector 1144 days ago
> > even putting #!/bin/python3 at the head of a script so that it runs through the shell.

Uh, not, in that case the shell is not involved at all. The kernel implements shebang and will automatically start the interpreter, whatever it is, without having to go through the shell.

1 comments

so, a typical noob. Even though he claims he shined in the operating systems course.
My son shined in that course, but I'd be surprised if he knew this particular bit of trivia.
so they didn't learn about fork/exec in that course? I don't believe it wasn't mentioned :)
OS class is not about Linux, its about OS theory. You learn the algorithms for priority queues and preempting tasks and even build a simple OS (depending on the class). Very little of it is about how IRL operating systems/kernels like NT or Linux work, though they did use some examples to demonstrate. Forking was more in Systems programming class, but that class was more about C, system calls, linking, and gdb. Not much time was dedicated to the syntax of shell scripts.
"forking" has absolutely nothing to do with "the syntax of shell scripts".

Proving my point more and more here…

Again, try to remain polite. I understand how forking works. Knowing how shebangs work is not something they teach directly. Forking is.
That particular bit of trivia wasn't covered. Why should it have been?
This was a rude comment, and I think youre better than this