summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/libiberty/vfork.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/libiberty/vfork.c')
-rw-r--r--contrib/binutils/libiberty/vfork.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/binutils/libiberty/vfork.c b/contrib/binutils/libiberty/vfork.c
new file mode 100644
index 0000000..4aa5c21
--- /dev/null
+++ b/contrib/binutils/libiberty/vfork.c
@@ -0,0 +1,22 @@
+/* Emulate vfork using just plain fork, for systems without a real vfork.
+ This function is in the public domain. */
+
+/*
+
+@deftypefn Supplemental int vfork (void)
+
+Emulates @code{vfork} by calling @code{fork} and returning its value.
+
+@end deftypefn
+
+*/
+
+#include "ansidecl.h"
+
+extern int fork PARAMS ((void));
+
+int
+vfork ()
+{
+ return (fork ());
+}
OpenPOWER on IntegriCloud