3 ms·
Fortunately this can never happen on linux. The kernel would never interpret a header less executable file as a shell script and invoke it with sh.
by tedunangst 8y ago
Fortunately this can never happen on linux. The kernel would never interpret a header less executable file as a shell script and invoke it with sh.
- jjnoakes 8y agoThe Linux kernel won't, but most shells happily will. echo 'ls' > test.sh chmod +x test.sh ./test.sh # Works just fine, no header and since the C library routine "system()" executes the command via /bin/sh, system("./test.sh") works fine too.