Re:Why bother with argv[0]?
by pzmarzly on Tuesday September 03, 2024 @12:06PM
(#41436308)
On Unixes it doesn't matter if /usr/bin/cmp is a script or a compiled binary. If the script has correct shebang, kernel takes care of executing it.
[ Parent
| on HN ]
Re:Why bother with argv[0]?
by oguz-ismail on Tuesday September 03, 2024 @12:51PM
(#41436741)
Shebangs are not part of the UNIX specification. What happens if an executable starts with `#!' is implementation-defined.
is being able to run busybox part of that specification? Linux ELF files are tagged for Linux OS, not generic Unix OS.
> is being able to run busybox part of that specification?
It's the other way round. This is like asking if running RHEL is part of the specification? Obviously not. But RHEL provides an environment that is quite close to the specification.
So is running a busybox part of the specification? Obviously not. But Busybox provides an environment that is close to the speficiation.
Then it would be busybox's responsibility to make busybox work.