diff options
author | dt <dt@FreeBSD.org> | 1998-09-12 22:03:20 +0000 |
---|---|---|
committer | dt <dt@FreeBSD.org> | 1998-09-12 22:03:20 +0000 |
commit | 613a2bdfdecf9393b99b2c5db227a51a940e746b (patch) | |
tree | 3f061a428b7f6ca96bf141b620aae2439a24bfab /lib/libc_r | |
parent | 9aee196299648c93b416ff7774bda3da6934d78d (diff) | |
download | FreeBSD-src-613a2bdfdecf9393b99b2c5db227a51a940e746b.zip FreeBSD-src-613a2bdfdecf9393b99b2c5db227a51a940e746b.tar.gz |
In libc_r, rename vfork syscall to _thread_sys_vfork and make vfork an alias
to fork. It is difficult to do real vfork in libc_r, since almost every
operation with file descriptsor changes _thread_fd_table and friends.
popen(3) works much better with this change.
Diffstat (limited to 'lib/libc_r')
-rw-r--r-- | lib/libc_r/uthread/Makefile.inc | 3 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_vfork.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/Makefile.inc b/lib/libc_r/uthread/Makefile.inc index 4fd3034..0c5c582 100644 --- a/lib/libc_r/uthread/Makefile.inc +++ b/lib/libc_r/uthread/Makefile.inc @@ -1,4 +1,4 @@ -# $Id: Makefile.inc,v 1.13 1998/06/01 02:14:34 jb Exp $ +# $Id: Makefile.inc,v 1.14 1998/09/07 19:01:43 alex Exp $ # uthread sources .PATH: ${.CURDIR}/uthread @@ -91,6 +91,7 @@ SRCS+= \ uthread_spec.c \ uthread_spinlock.c \ uthread_suspend_np.c \ + uthread_vfork.c \ uthread_wait4.c \ uthread_write.c \ uthread_writev.c \ diff --git a/lib/libc_r/uthread/uthread_vfork.c b/lib/libc_r/uthread/uthread_vfork.c new file mode 100644 index 0000000..bbfcf00 --- /dev/null +++ b/lib/libc_r/uthread/uthread_vfork.c @@ -0,0 +1,9 @@ +#include <unistd.h> +#ifdef _THREAD_SAFE + +int +vfork(void) +{ + return (fork()); +} +#endif |