Re:You can do a lot with an empty file
by abbeyj on Wednesday April 06, 2022 @07:22PM
(#30938703)
This can lead to an interesting situation where a program will work if launched by a shell (or by another program that uses `execlp`), but will fail if it is launched with a different variant of `exec`. For example:
It can be quite fun to track down why a program executes successfully and then later fails to execute, with no changes made to the program in between.
[ Parent
| on HN ]
I knew this about the programming languages which wrap execution in a shell, but I never knew that execlp/execvp/execvpe handled ENOEXEC internally and wrapped the command in a shell too. TIL!