Re: execve() returns ENOENT when ld-linux.so isn't found

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Luca Barbieri
Date: Thursday, March 25, 2010 - 2:00 pm

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.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: execve() returns ENOENT when ld-linux.so isn't found, Olaf van der Spek, (Thu Mar 25, 12:29 pm)
Re: execve() returns ENOENT when ld-linux.so isn't found, Luca Barbieri, (Thu Mar 25, 2:00 pm)
Re: execve() returns ENOENT when ld-linux.so isn't found, Ulrich Drepper, (Fri Mar 26, 4:56 am)
Re: execve() returns ENOENT when ld-linux.so isn't found, Olaf van der Spek, (Fri Mar 26, 11:40 am)
Re: execve() returns ENOENT when ld-linux.so isn't found, Luca Barbieri, (Fri Mar 26, 2:06 pm)
Re: execve() returns ENOENT when ld-linux.so isn't found, Ulrich Drepper, (Fri Mar 26, 2:15 pm)
Re: execve() returns ENOENT when ld-linux.so isn't found, Olaf van der Spek, (Sat Mar 27, 4:50 am)
Re: execve() returns ENOENT when ld-linux.so isn't found, Ulrich Drepper, (Sat Mar 27, 5:05 am)
Re: execve() returns ENOENT when ld-linux.so isn't found, Luca Barbieri, (Sat Mar 27, 7:51 am)
Re: execve() returns ENOENT when ld-linux.so isn't found, Olaf van der Spek, (Mon Mar 29, 7:40 am)
Re: execve() returns ENOENT when ld-linux.so isn't found, Ulrich Drepper, (Mon Mar 29, 7:57 am)
Re: execve() returns ENOENT when ld-linux.so isn't found, Andreas Schwab, (Mon Mar 29, 9:00 am)
Re: execve() returns ENOENT when ld-linux.so isn't found, Olaf van der Spek, (Wed Mar 31, 12:36 pm)