From: simonmar Date: Tue, 4 Feb 2003 11:55:54 +0000 (+0000) Subject: [project @ 2003-02-04 11:55:54 by simonmar] X-Git-Tag: nhc98-1-18-release~740 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=749dfc901df5adfe99c1bd2c2dc84767c6de0b95;p=ghc-base.git [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. --- 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) {