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:

    When we suffer anguish we return to early childhood because that is the period in which we first learnt to suffer the experience of total loss. It was more than that. It was the period in which we suffered more total losses than in all the rest of our life put together.
    John Berger (b. 1926)

    The chickadee and nuthatch are more inspiring society than statesmen and philosophers, and we shall return to these last as to more vulgar companions.
    Henry David Thoreau (1817–1862)