I am teaching an Operating Systems course and trying to wrap my mind around the
execve technique for creating new processes.
My current understanding is that a fork make a complete copy of the old process, establishes a new PID and parent/child relationship, but otherwise does very little else.
On the other hand, after the child process is created, it runs execve to replace most of its memory with the new process. For example, the program code, stack, and heap are completely replaced and started from scratch as a new program.
But not everything is replaced in the new process. The child process inherits file descriptors (which allows pipes to be set up before the execve), the process ID (PID) and user ID (UID) and some permissions (man page).
I imagine the full list of properties that are NOT replaced by an execve call is quite long, but are there any other key properties like the ones I mentioned above that I'm missing?