Bruce M Simpson <[EMAIL PROTECTED]> writes:
> On Sat, Sep 25, 2004 at 01:35:07PM +0200, Dag-Erling Smørgrav wrote:
> > > If we were to implement POSIX spawn(), we'd need something like this.
> > Uh, no.  posix_spawn(3) can be implemented entirely in userland and
> > does not require any special kernel support.
> Discussions with peter@ and others on IRC have been ongoing regarding doing
> it in kernel space, so as to avoid unnecessarily expensive VM fork operations
> when 'spawning' a process.
>
> I'd be interested to hear more about your proposal for doing this in userland.

posix_spawn(3) can be implemented in terms of fork(2) / execve(2), and
if you're worried about VM overhead you can always use vfork(2) (which
has the additional benefit of allowing you to pass an error code back
to the parent process, since the child can write to the parent's
address space until it calls execve(2)).

DES
-- 
Dag-Erling Smørgrav - [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to