Add vfork() system call
-Same semantics as fork() as it's really just a stub -Eases porting of BSD utilities
This commit is contained in:
parent
159b8f71b7
commit
f9ccc501f8
@ -91,11 +91,7 @@ system(command)
|
|||||||
}
|
}
|
||||||
|
|
||||||
(void)__readlockenv();
|
(void)__readlockenv();
|
||||||
#ifdef __minix
|
|
||||||
switch(pid = fork() ) {
|
|
||||||
#else /* !__minix */
|
|
||||||
switch(pid = vfork()) {
|
switch(pid = vfork()) {
|
||||||
#endif /* !__minix */
|
|
||||||
case -1: /* error */
|
case -1: /* error */
|
||||||
(void)__unlockenv();
|
(void)__unlockenv();
|
||||||
sigaction(SIGINT, &intsa, NULL);
|
sigaction(SIGINT, &intsa, NULL);
|
||||||
|
@ -76,4 +76,3 @@ futimes
|
|||||||
utrace
|
utrace
|
||||||
uuidgen
|
uuidgen
|
||||||
vadvise
|
vadvise
|
||||||
vfork
|
|
||||||
|
@ -16,7 +16,7 @@ SRCS+= accept.c access.c bind.c brk.c sbrk.c compat.S \
|
|||||||
vectorio.c shutdown.c sigaction.c sigpending.c sigreturn.c sigsuspend.c\
|
vectorio.c shutdown.c sigaction.c sigpending.c sigreturn.c sigsuspend.c\
|
||||||
sigprocmask.c socket.c socketpair.c stat.c statvfs.c symlink.c \
|
sigprocmask.c socket.c socketpair.c stat.c statvfs.c symlink.c \
|
||||||
sync.c syscall.c sysuname.c truncate.c umask.c unlink.c write.c \
|
sync.c syscall.c sysuname.c truncate.c umask.c unlink.c write.c \
|
||||||
_exit.c _ucontext.c environ.c __getcwd.c
|
_exit.c _ucontext.c environ.c __getcwd.c vfork.c
|
||||||
|
|
||||||
# Minix specific syscalls.
|
# Minix specific syscalls.
|
||||||
SRCS+= cprofile.c lseek64.c sprofile.c _mcontext.c
|
SRCS+= cprofile.c lseek64.c sprofile.c _mcontext.c
|
||||||
|
16
lib/nbsd_libc/sys-minix/vfork.c
Normal file
16
lib/nbsd_libc/sys-minix/vfork.c
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#include <sys/cdefs.h>
|
||||||
|
#include "namespace.h"
|
||||||
|
#include <lib.h>
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#ifdef __weak_alias
|
||||||
|
__weak_alias(vfork, _vfork)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
PUBLIC pid_t vfork()
|
||||||
|
{
|
||||||
|
message m;
|
||||||
|
|
||||||
|
return(_syscall(PM_PROC_NR, FORK, &m));
|
||||||
|
}
|
@ -289,6 +289,8 @@ int usleep(useconds_t);
|
|||||||
#ifndef __LIBC12_SOURCE__
|
#ifndef __LIBC12_SOURCE__
|
||||||
pid_t vfork(void) __RENAME(__vfork14);
|
pid_t vfork(void) __RENAME(__vfork14);
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
pid_t vfork(void);
|
||||||
#endif /* !__minix */
|
#endif /* !__minix */
|
||||||
|
|
||||||
#ifndef __AUDIT__
|
#ifndef __AUDIT__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user