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:
“O God of our flesh, return us to Your wrath,
Let us be evil could we enter in
Your grace, and falter on the stony path!”
—Allen Tate (18991979)
“I thought to myself that it was still another Sunday gone by, that Mother was now buried, that I was going to return to work and that, after all, nothing had changed.”
—Albert Camus (19131960)