blob: eb4ff622b44f5ba6100b64f8ccf1d5880b670c52 [file] [log] [blame]
Jason Merrill6599da01997-08-21 18:57:35 -04001/* Emulate vfork using just plain fork, for systems without a real vfork.
2 This function is in the public domain. */
3
DJ Delorieaaa5f032001-09-26 14:16:17 -04004/*
5
Joseph Myers7f8fa052001-10-07 22:53:31 +01006@deftypefn Supplemental int vfork (void)
DJ Delorieaaa5f032001-09-26 14:16:17 -04007
8Emulates @code{vfork} by calling @code{fork} and returning its value.
9
10@end deftypefn
11
12*/
13
Kaveh R. Ghazi838f8562000-07-21 20:08:36 +000014#include "ansidecl.h"
15
Gabriel Dos Reis7a17ef52005-03-28 01:28:01 +000016extern int fork (void);
Kaveh R. Ghazi838f8562000-07-21 20:08:36 +000017
Jason Merrill6599da01997-08-21 18:57:35 -040018int
Gabriel Dos Reis7a17ef52005-03-28 01:28:01 +000019vfork (void)
Jason Merrill6599da01997-08-21 18:57:35 -040020{
21 return (fork ());
22}