Effect of exec() after vfork() on parent's memory

78 Views Asked by At

I'm currently reading Silberschatz's Operating Systems chapter on virtual memory.

Here it is stated that :

" With vfork(), the parent process is suspended, and the child process uses the address space of the parent. Because vfork() does not use copy-on-write, if the child process changes any pages of the parent’s address space, the altered pages will be visible to the parent once it resumes.

[...] Vfork() is intended to be used when the child process calls exec() immediately after creation. "

If I recall correctly, exec( ) will replace the current process image.

So dose calling vfork() with a subsequent exec() call replace the parent's process image as well since the address space is shared?

0

There are 0 best solutions below