[lkml]   [2010]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: execve() returns ENOENT when isn't found
POSIX 2008 says, for exec*:

A component of path or file does not name an existing file or path
or file is an empty string.
The new process image file has the appropriate access permission
but has an unrecognized format.
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.

 \ /
  Last update: 2010-03-25 22:03    [W:0.068 / U:3.316 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site