Exec at the OS level
Up until now, we have covered six of the seven exec family APIs. Finally, the seventh one is the execve(2). Did you notice? The 2 in brackets conveys that it's a system call (recall the details covered regarding system calls in Chapter 1, Linux System Architecture).
The fact is, all the preceding six exec APIs are within glibc—the library layer; only the execve(2) is a system call. You will realize that, ultimately, to have a process be able to execute another program—thus launching or running a successor—will require OS-level support. So, yes, the reality is that all the above six exec APIs are merely wrappers; they transform their arguments and invoke the execve system call.
This is the signature of the execve(2) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access