4 ms·
On the bright side, syscalls have manpages that accurately describe their errors. In this case, "man 2 execve" says: > ENOENT The file pathname or a scr
by scottlamb 5y ago
On the bright side, syscalls have manpages that accurately describe their errors. In this case, "man 2 execve" says:
> ENOENT The file pathname or a script or ELF interpreter does not exist.
- dTal 5y agoWould you think to run "man 2 execve" when getting "file not found" with a random binary though?
- froh 5y agoYes, you'd rather strace and as that also obscurely fails you'd then ldd the binary...
- scottlamb 5y agoNo, but I'd think to do the ls and the strace as the author did. Then I'd check the manpage instead of stackoverflow. Obviously her way worked, too, but I prefer manpages. /shruggie (Well, I just knew the answer in this case because I've hit this particular error a bunch of times, but that's not really the point.) I actually agree with jmgao's point that this inscrutability is the downside of syscalls' limited error return; just pointing out the good as well as the bad.