News for hackers. Stuff that matters.
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.
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.
Re:Why bother with argv[0]? by immibis on Wednesday September 04, 2024 @08:12AM (#41444734)
is being able to run busybox part of that specification? Linux ELF files are tagged for Linux OS, not generic Unix OS.
Re:Why bother with argv[0]? by blenderob on Wednesday September 04, 2024 @08:20AM (#41444786)
> 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.

Re:Why bother with argv[0]? by immibis on Wednesday September 04, 2024 @11:49AM (#41447185)
Then it would be busybox's responsibility to make busybox work.
Re:Why bother with argv[0]? by account42 on Thursday September 05, 2024 @06:52AM (#41455388)
UNIX/POSIX doesn't specify an executable format at all