Open System Services System Calls Reference Manual (G06.25+, H06.03+)

System Functions (e) execve(2)
When the File Is Invalid
If the process image le is not a valid executable object, or if the text le does not contain the
header line, the execve() function call fails and errno is set to the value of [ENOEXEC].
Open Files
File descriptors open in the calling process image remain open in the new process image, except
for those:
Whose close-on-exec ag FD_CLOEXEC is set (see the fcntl(2) reference page)
Opened using a Guardian function or procedure call
If the process le segment of the new process image is smaller than the process le segment of
the calling process image and if the calling process image has a large number of le descriptors
open, then the system might not be able to propagate all the open le descriptors to the new pro-
cess image. When this situation occurs, the function call fails and errno is set to the value of
[EMFILE].
For those le descriptors that remain open, all attributes of the open le descriptor, including le
locks, remain unchanged. All directory streams are closed.
Shared Memory
Any attached shared memory segments are detached by a successful call to a function in the exec
set of functions. Refer to the shmat(2) reference page for additional information about shared
memory segment use.
Semaphores
Semaphore set IDs attached to a calling process are also attached to the new process. The new
process also inherits the adjust-on-exit (semadj) values of the calling process.
Refer to the semget(2) reference page for additional information about semaphore use.
Signals
Signals set to:
The default action (SIG_DFL) in the calling process image are set to the default action
in the new process image.
Be ignored (SIG_IGN) by the calling process image are set to be ignored by the new
process image.
Cause abnormal termination (SIG_ABORT) in the calling process image are set to that |
action in the new process image.
Cause entry into the debugger (SIG_DEBUG) in the calling process image are set to that |
action in the new process image.
Be caught by the calling process image are set to the default action in the new process
image.
See the signal(4) reference page either online or in the Open System Services System Calls Refer- |
ence Manual.
User ID and Group ID
If the set-user-ID mode bit of the new process image le is set (see the chmod(2) reference
page), the effective user ID of the new process image is set to the owner ID of the new process
image le. Similarly, if the set-group-ID mode bit of the new process image le is set, the
effective group ID of the new process image is set to the group ID of the new process image le.
The real user ID, real group ID, and supplementary group IDs of the new process image remain
the same as those of the calling process image. The effective user ID and effective group ID of
527186-003 Hewlett-Packard Company 237