I'm looking at the man page for the libc function
execve under Ubuntu 16.04.
I'm trying to handle errors as described by the man page:
RETURN VALUE On success, execve() does not return, on error -1 is returned, and errno is set appropriately.
So I check below on the ERROR section and I see:
ERRORS ... EACCES Search permission is denied on a component of the path prefix of filename or the name of a script interpreter. (See also path_resolution(7).) EACCES The file or a script interpreter is not a regular file. EACCES Execute permission is denied for the file or a script or ELF interpreter. EACCES The filesystem is mounted noexec. ....
Does this mean that
EACCES could be any of these things? Or less likely all of them?
How can I tell them apart when handling errors from a switch statement?