diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2023-04-01 19:32:24 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2023-04-02 13:10:06 +0200 |
commit | 71786719c2480090c1d2df88bc390b088185d7cb (patch) | |
tree | 8bc1373f20eecb567db93b0514d34fdf905371ec /src/Process.hs | |
parent | e01cae88b81fa6f9f35b32ff2e3ca57c34dd7f58 (diff) |
Network namespace type
Diffstat (limited to 'src/Process.hs')
-rw-r--r-- | src/Process.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Process.hs b/src/Process.hs index a90a734..09745fb 100644 --- a/src/Process.hs +++ b/src/Process.hs @@ -29,6 +29,7 @@ import System.Process import {-# SOURCE #-} GDB import Network +import Network.Ip import Output import Run.Monad import Test @@ -89,7 +90,7 @@ lineReadingLoop process h act = spawnOn :: Either Network Node -> ProcName -> Maybe Signal -> String -> TestRun Process spawnOn target pname killWith cmd = do let netns = either netnsName netnsName target - let prefix = T.unpack $ "ip netns exec \"" <> netns <> "\" " + let prefix = T.unpack $ "ip netns exec \"" <> textNetnsName netns <> "\" " (Just hin, Just hout, Just herr, handle) <- liftIO $ createProcess (shell $ prefix ++ cmd) { std_in = CreatePipe, std_out = CreatePipe, std_err = CreatePipe , env = Just [("EREBOS_DIR", either netDir nodeDir target)] |