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:

    Real kindness seeks no return;
    What return can the world make to rain clouds?
    Tiruvalluvar (c. 5th century A.D.)

    A pun does not commonly justify a blow in return. But if a blow were given for such cause, and death ensued, the jury would be judges both of the facts and of the pun, and might, if the latter were of an aggravated character, return a verdict of justifiable homicide.
    Oliver Wendell Holmes, Sr. (1809–1894)