Subject: Re: new vfork(2) implementation
To: None <current-users@NetBSD.ORG>
From: Christos Zoulas <>
List: current-users
Date: 01/04/1998 04:43:30
In article <> Jason Thorpe <> writes:
>Hi folks,
[stuff deleted]
>will continue to work.  Those rules, for those who don't know, are:
>	(1) Must be very careful with local variables, since the child
>	    and the parent may end up sharing them.
>	(2) In the child, never call "return" from the context where the
>	    vfork occured.  It will trash the parent's stack.
>	(3) In the child, never call exit(3) (or anything that calls exit(3)),
>	    because it will run the parent's exit-time cleanup functions,
>	    modifying the parent's address space.  Use _exit(2) instead.

(4) If we change any of the file descriptors, we will need to restore
    them to what the parent expects.
(5) Do any of the ports keep the signal info in user space? Because if
    they do, signal handlers will need to be saved and restored too.