Re:Why bother with argv[0]?
by yjftsjthsd-h on Tuesday September 03, 2024 @02:29PM
(#41437674)
Well /bin/sh is also busybox, so I think you'd need
[ Parent
| on HN ]
Great point!
Actually this observation invalidates the whole setup. Because even though you could define /bin/sh itself as:
#!/bin/busybox sh
exec /bin/busybox sh
Then you still cannot use #!/bin/sh in any other shell scripts, because for historical reasons the interpreter of a script is not allowed to be another interpreted script, it must be a binary. So /bin/sh pretty much has to be an actual binary.