Messages in this thread | | | Date | Thu, 25 Mar 2010 22:00:49 +0100 | Subject | Re: execve() returns ENOENT when ld-linux.so isn't found | From | Luca Barbieri <> |
| |
POSIX 2008 says, for exec*:
[ENOENT] A component of path or file does not name an existing file or path or file is an empty string. [ENOEXEC] The new process image file has the appropriate access permission but has an unrecognized format. [EINVAL] The new process image file has appropriate privileges and has a recognized executable binary format, but the system does not support execution of a file with this format.
None of these perfectly fit, but EINVAL seems the closest. Note that ENOENT only specifies that the error happens for "not found" problems in the function argument itself, so it is not really more correct than the others.
Linux also defines ELIBACC (for a.out I believe): #define ELIBACC 79 /* Can not access a needed shared library */
This also seems a possible candidate.
Not sure if it is safe to change this though, or what other systems do.
| |