From 749dfc901df5adfe99c1bd2c2dc84767c6de0b95 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 4 Feb 2003 11:55:54 +0000 Subject: [PATCH] [project @ 2003-02-04 11:55:54 by simonmar] 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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cbits/system.c b/cbits/system.c index 4d9fb10..3ace591 100644 --- a/cbits/system.c +++ b/cbits/system.c @@ -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 */ @@ -16,6 +16,14 @@ #include #endif +#ifdef HAVE_VFORK_H +#include +#endif + +#ifdef HAVE_VFORK +#define fork vfork +#endif + HsInt systemCmd(HsAddr cmd) { -- 1.7.10.4