diff options
author | marcel <marcel@FreeBSD.org> | 1999-08-16 11:49:30 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 1999-08-16 11:49:30 +0000 |
commit | bb62e6fb8596301eafd991549ca8e8d483a626b5 (patch) | |
tree | 7ecaa95058df8069c383503d881fc6c360b9a7f8 /sys/compat | |
parent | f909574334998e6f81a18fb4c70e45f9cc371aa8 (diff) | |
download | FreeBSD-src-bb62e6fb8596301eafd991549ca8e8d483a626b5.zip FreeBSD-src-bb62e6fb8596301eafd991549ca8e8d483a626b5.tar.gz |
Implement linux_vfork() syscall by calling vfork(). Analogous to the
linux_fork() implementation.
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 684a9fc..6bdadce 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 |