Timeline for Why not use pathless shebangs?
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 7, 2019 at 18:36 | comment | added | Tim Ruehsen rockdaboot | -S is only available since coreutils 8.30. See gitlab.com/gnuwget/wget/commit/…. | |
| Feb 24, 2019 at 2:36 | comment | added | TamusJRoyce | #!/usr/bin/env -S [shebang] was required for me running node without knowing its path (using nvm - which places it in a different location than I originally expected). | |
| Apr 13, 2017 at 12:36 | history | edited | CommunityBot | replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/ | |
| Aug 23, 2015 at 2:28 | comment | added | Peter Cordes | For anyone that's curious about how "shebang re-routes the execve call internally": It's actually part of a generic mechanism for running interpreters on executables that need them. Dynamically-linked ELF executables are "interpreted" by /lib64/ld-linux-x86-64.so.2 (see ldd output). Linux makes it fully generic: binfmt support (since 2.1.43) lets you register interpreter-path / magic-number-or-file-extension pairs. You can have PE32 .exes invoke wine when you run them, Java class and jar files invoke java, etc. etc. | |
| Jun 5, 2013 at 8:44 | history | edited | Gilles 'SO- stop being evil' | CC BY-SA 3.0 | fixed terminology (execve interprets the path as-is, but of course it can be relative) (thanks Stephane Chazelas) |
| Jun 5, 2013 at 2:28 | comment | added | Stéphane Chazelas | No, the kernel does not require an absolute path in execve nor in the shebang though it makes little sense to have a relative path in a shebang. | |
| May 30, 2013 at 0:21 | vote | accept | Amelio Vazquez-Reina | ||
| May 29, 2013 at 23:24 | history | answered | Gilles 'SO- stop being evil' | CC BY-SA 3.0 |