diff --git a/tests/libposix/posix004.hs b/tests/libposix/posix004.hs
index de1ec743d4c3799234d3cb4fe07b7749a1e0c510..56c16f02dc1262da10b7519783554fda2aaff2f6 100644
--- a/tests/libposix/posix004.hs
+++ b/tests/libposix/posix004.hs
@@ -10,6 +10,10 @@ main = do test1
           putStrLn "I'm happy."
 
 test1 = do
+    -- Force SIGFPE exceptions to not be ignored.  Under some
+    -- circumstances this test will be run with SIGFPE
+    -- ignored, see #7399
+    installHandler sigFPE Default Nothing
     forkProcess $ raiseSignal floatingPointException
     Just (pid, tc) <- getAnyProcessStatus True False
     case tc of