diff options
author | Marcel Moolenaar <marcel@FreeBSD.org> | 1999-08-16 11:49:30 +0000 |
---|---|---|
committer | Marcel Moolenaar <marcel@FreeBSD.org> | 1999-08-16 11:49:30 +0000 |
commit | 42035021f5556bf0106789d430b3e372ae55bebc (patch) | |
tree | de8a191292f0756b6752454e13a07d514d1f3868 /sys/compat | |
parent | 405f64d439c1629748ee49300d847fa61d4ee4bc (diff) | |
download | src-42035021f5556bf0106789d430b3e372ae55bebc.tar.gz src-42035021f5556bf0106789d430b3e372ae55bebc.zip |
Implement linux_vfork() syscall by calling vfork(). Analogous to the
linux_fork() implementation.
Notes
Notes:
svn path=/head/; revision=49890
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 684a9fcdf7b4..6bdadced6a05 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_misc.c,v 1.62 1999/08/15 13:28:35 marcel Exp $ + * $Id: linux_misc.c,v 1.63 1999/08/15 17:28:39 marcel Exp $ */ #include "opt_compat.h" @@ -575,6 +575,23 @@ linux_fork(struct proc *p, struct linux_fork_args *args) return 0; } +int +linux_vfork(struct proc *p, struct linux_vfork_args *args) +{ + int error; + +#ifdef DEBUG + printf("Linux-emul(%ld): fork()\n", p->p_pid); +#endif + + if ((error = vfork(p, (struct vfork_args *)args)) != 0) + return error; + /* Are we the child? */ + if (p->p_retval[1] == 1) + p->p_retval[0] = 0; + return 0; +} + #define CLONE_VM 0x100 #define CLONE_FS 0x200 #define CLONE_FILES 0x400 |