2 ms·
Nothing special is needed here. execve() does blow away the address space of the process and replaces it. As to fork(), it copies the address space. Of cours
by cryptonector 9y ago
Nothing special is needed here. execve() does blow away the address space of the process and replaces it. As to fork(), it copies the address space. Of course, you can't putenv() on the child-side of fork() if the parent was multi-threaded, and you may not even be able to getenv() in that case either (check the standards and your C library's fork() man page).