diff options
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 a93b464..a90a734 100644 --- a/src/Process.hs +++ b/src/Process.hs @@ -88,7 +88,8 @@ lineReadingLoop process h act = spawnOn :: Either Network Node -> ProcName -> Maybe Signal -> String -> TestRun Process spawnOn target pname killWith cmd = do - let prefix = either (const "") (\node -> "ip netns exec \"" ++ unpackNodeName (nodeName node) ++ "\" ") target + let netns = either netnsName netnsName target + let prefix = T.unpack $ "ip netns exec \"" <> 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)] |