Exec (operating System) - Return Value

Return Value

Normally the exec function will replace the current process, so it cannot return anything to the original process. Processes do have an exit status, but that value is collected by the parent process.

If an exec function does return to the calling process, an error occurred, the return value is −1, and errno is set to one of the following values:

Name Notes
E2BIG The argument list exceeds the system limit.
EACCES The specified file has a locking or sharing violation.
ENOENT The file or path name not found.
ENOMEM Not enough memory is available to execute the new process image.

Read more about this topic:  Exec (operating System)

Famous quotes containing the word return:

    Narcissus weeps to find that his Image does not return his love.
    Mason Cooley (b. 1927)

    Athletes have studied how to leap and how to survive the leap some of the time and return to the ground. They don’t always do it well. But they are our philosophers of actual moments and the body and soul in them, and of our manoeuvres in our emergencies and longings.
    Harold Brodkey (b. 1930)