[project @ 2003-02-04 11:55:54 by simonmar]
authorsimonmar <unknown>
Tue, 4 Feb 2003 11:55:54 +0000 (11:55 +0000)
committersimonmar <unknown>
Tue, 4 Feb 2003 11:55:54 +0000 (11:55 +0000)
Add support for using vfork, which I apparently removed when this file
was moved over from ghc/lib/std/cbits.  Using vfork on Linux makes
quite a big difference - eg. when building GHC.Base with -split-objs ,
I saw a 2.5s reduction in system time.

cbits/system.c

index 4d9fb10..3ace591 100644 (file)
@@ -1,7 +1,7 @@
 /* 
  * (c) The University of Glasgow 2002
  *
- * $Id: system.c,v 1.6 2002/03/26 21:02:19 sof Exp $
+ * $Id: system.c,v 1.7 2003/02/04 11:55:54 simonmar Exp $
  *
  * system Runtime Support
  */
 #include <stdlib.h>
 #endif
 
+#ifdef HAVE_VFORK_H
+#include <vfork.h>
+#endif
+
+#ifdef HAVE_VFORK
+#define fork vfork
+#endif
+
 HsInt
 systemCmd(HsAddr cmd)
 {