diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-09-12 14:56:47 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-09-12 14:56:47 +0000 |
commit | fc3a6dd2e0bb726e8ee521e5806439181f93b995 (patch) | |
tree | 0c5bcacb0666ee52c36a7eae081e87656b5721ee /cbits | |
parent | 6d8372f7720ce67c5f371f8faad4d4ac822f0e30 (diff) |
in pPrPr_disableITimers (who made up that name?) call the RTS to disable the timer
Since we switched to using timer_create() in the RTS, this function
has been failing to disables the timer interrupts. This turns out to
be the cause of the random framework failures in the test suite.
Invoking the RTS to turn off the timer signal is the right thing.
Diffstat (limited to 'cbits')
-rw-r--r-- | cbits/execvpe.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/cbits/execvpe.c b/cbits/execvpe.c index 160271c..1d96aa5 100644 --- a/cbits/execvpe.c +++ b/cbits/execvpe.c @@ -5,6 +5,10 @@ -------------------------------------------------------------------------- */ #include "execvpe.h" +#ifdef __GLASGOW_HASKELL__ +#include "Rts.h" +#endif + #if !(defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)) /* to the end */ /* Evidently non-Posix. */ @@ -158,18 +162,9 @@ execvpe(char *name, char *const argv[], char **envp) /* Copied verbatim from ghc/lib/std/cbits/system.c. */ void pPrPr_disableITimers (void) { -# ifdef HAVE_SETITIMER - /* Reset the itimers in the child, so it doesn't get plagued - * by SIGVTALRM interrupts. - */ - struct timeval tv_null = { 0, 0 }; - struct itimerval itv; - itv.it_interval = tv_null; - itv.it_value = tv_null; - setitimer(ITIMER_REAL, &itv, NULL); - setitimer(ITIMER_VIRTUAL, &itv, NULL); - setitimer(ITIMER_PROF, &itv, NULL); -# endif +#ifdef __GLASGOW_HASKELL__ + stopTimer(); +#endif } #endif |