Re: Fork, exec, and child inheritance oh my
Re: Fork, exec, and child inheritance oh my
- Subject: Re: Fork, exec, and child inheritance oh my
- From: Paul Nelson <email@hidden>
- Date: Sun, 01 Jul 2007 17:28:14 -0500
- Thread-topic: Fork, exec, and child inheritance oh my
on 7/1/07 5:07 PM, Dave Keck at email@hidden wrote:
> Right now I've been walking the dark alleys of fork(), execv(), and
> mmap(), but I'm not seeing much light. It seems what we need is a
> version of execv() that wouldn't completely overwrite the parent
> process, so that the parent and child would share the same address
> space and both able to access the symbols loaded by the child process.
The problem is that parent and child processes never "share" the same
address space. When the child process changes memory, a copy-on-write page
fault occurs, giving the child it's own copy of the changed memory. The
parent process memory is unchanged.
Perhaps you could explain why you don't want the parent process to simply
load the code itself?
Paul Nelson
Thursby Software Systems, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden