Skip to content
Snippets Groups Projects
Commit 72774b03 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel :man_dancing:
Browse files

Use more direct CApiFFI for pPrPr_disableITimers

parent 27963615
No related branches found
No related tags found
No related merge requests found
{-# LANGUAGE CApiFFI #-} {-# LANGUAGE CApiFFI #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE Trustworthy #-}
module System.Posix.Process.Internals ( module System.Posix.Process.Internals (
...@@ -26,7 +25,7 @@ data ProcessStatus ...@@ -26,7 +25,7 @@ data ProcessStatus
-- this function disables the itimer, which would otherwise cause confusing -- this function disables the itimer, which would otherwise cause confusing
-- signals to be sent to the new process. -- signals to be sent to the new process.
foreign import ccall unsafe "pPrPr_disableITimers" foreign import capi unsafe "Rts.h stopTimer"
pPrPr_disableITimers :: IO () pPrPr_disableITimers :: IO ()
foreign import ccall unsafe "__hsunix_execvpe" foreign import ccall unsafe "__hsunix_execvpe"
......
#ifdef __GLASGOW_HASKELL__
// for 'void StopTimer(void)' prototype
# include "Rts.h"
#endif
#define HSUNIX_EXECVPE_H_NO_COMPAT
#include "execvpe.h"
/* Copied verbatim from ghc/lib/std/cbits/system.c. */
void pPrPr_disableITimers (void)
{
#ifdef __GLASGOW_HASKELL__
stopTimer();
#endif
}
...@@ -22,7 +22,4 @@ execvpe(const char *name, char *const argv[], char *const envp[]); ...@@ -22,7 +22,4 @@ execvpe(const char *name, char *const argv[], char *const envp[]);
#endif #endif
#endif #endif
// implemented in cbits/ghcrts.c
extern void pPrPr_disableITimers (void);
#endif #endif
...@@ -133,4 +133,3 @@ library ...@@ -133,4 +133,3 @@ library
cbits/HsUnix.c cbits/HsUnix.c
cbits/dirUtils.c cbits/dirUtils.c
cbits/execvpe.c cbits/execvpe.c
cbits/ghcrts.c
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment