@@ -2,7 +2,9 @@
22{-# LANGUAGE CPP #-}
33{-# LANGUAGE OverloadedStrings #-}
44{-# LANGUAGE RecursiveDo #-}
5+{-# LANGUAGE ScopedTypeVariables #-}
56import Control.Concurrent
7+import Control.Exception
68import Control.Monad
79import Control.Monad.IO.Class
810import Data.Int
@@ -36,11 +38,13 @@ failureLimit = 0
3638main :: IO ()
3739main = do
3840 uid <- getEffectiveUserID
39− unshare [User, Network]
40− writeUserMappings Nothing [UserMapping 0 uid 1]
41+ handle (\(_ :: IOError) -> return ()) $ do -- If we run into an exception with sandboxing, just don't bother
42+ unshare [User, Network]
43+ writeUserMappings Nothing [UserMapping 0 uid 1]
44+ callCommand "ip link set lo up ; ip addr"
4145 mainThread <- myThreadId
4246 withSystemTempDirectory "reflex-dom-core_test_gc" $ \tmp -> do
43− browserProcess <- spawnCommand $ "ip link set lo up ; ip addr ; sleep 1 ; echo 'Starting Chromium' ; chromium --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 --user-data-dir=" ++ tmp ++ " http://localhost:3911 ; echo 'Chromium exited'"
47+ browserProcess <- spawnCommand $ "echo 'Starting Chromium' ; chromium --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 --user-data-dir=" ++ tmp ++ " http://localhost:3911 ; echo 'Chromium exited'"
4448 let finishTest result = do
4549 interruptProcessGroupOf browserProcess
4650 throwTo mainThread result