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:

    If a man, notoriously and designedly, insults and affronts you, knock him down; but if he only injures you, your best revenge is to be extremely civil to him in your outward behaviour, though at the same time you counterwork him, and return him the compliment, perhaps with interest.
    Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)

    Love is life. All, everything that I understand, I understand only because I love. Everything is, everything exists, only because I love. Everything is united by it alone. Love is God, and to die means that I, a particle of love, shall return to the general and eternal source.
    Leo Tolstoy (1828–1910)