HP-UX Reference (11i v3 07/02) - 2 System Calls (vol 5)

e
exec(2) exec(2)
[EINVAL] argv points to NULL and null pointer dereferencing is allowed. In this case, NULL is a
valid address, but is considered an invalid argument.
[ELOOP] Too many symbolic links were encountered in translating the path name.
[ENAMETOOLONG]
The executable file’s path name or the interpreter’s path name exceeds
PATH_MAX
bytes, or the length of a component of the path name exceeds
NAME_MAX bytes while
_POSIX_NO_TRUNC
is in effect.
[ENOENT] path points to an empty string.
[ENOENT] One or more components of the executable file’s path name or the interpreter’s path
name do not exist.
[ENOEXEC] The executable file is shorter than indicated by the size values in its header, or is other-
wise inconsistent. The reliable detection of this error is implementation dependent.
[ENOEXEC] The function call is not
execlp() or execvp(), and the executable file has the
appropriate access permission, but there is neither a valid magic number nor the charac-
ters
#! as the first two bytes of the file’s initial line.
[ENOEXEC] The number of bytes in the initial line of a script file exceeds the system’s maximum.
[ENOMEM] The new process requires more memory than is available or allowed by the system-
imposed maximum.
[ENOTDIR] A component of the executable file’s path prefix or the interpreter’s path prefix is not a
directory.
[EPERM] The process does not have sufficient privileges.
[ETXTBSY] The executable file is currently open for writing.
WARNINGS
Unsharable executable files are not supported. These are files whose EXEC_MAGIC magic number was
produced with the -N option of ld (see ld(1)).
It is recommended to use the execve() call in multi-threaded applications to avoid possible deadlocks.
DEPENDENCIES
HP Process Resource Manager
If the optional HP Process Resource Manager (PRM) software is installed and configured, the process’s pro-
cess resource group ID is not changed by exec*(). See prmconfig(1) for a description of how to configure
HP PRM, and prmconf(4) for the definition of process resource group.
SEE ALSO
sh(1), sh-posix(1), kctune(1M), alarm(2), exit(2), fork(2), nice(2), ttrace(2), semop(2), signal(2), times(2),
ulimit(2), umask(2), a.out(4), acl(5), environ(5), privileges(5), signal(5), thread_safety(5).
HP Process Resource Manager: prmconfig(1), prmconf(4) in HP Process Resource Manager User’s Guide.
STANDARDS CONFORMANCE
environ: AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
execl(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
execle(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
execlp(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
execv(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
execve(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
execvp(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
HP-UX 11i Version 3: February 2007 4 Hewlett-Packard Company 97