diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-12-16 20:54:58 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-12-16 21:51:21 +0100 |
commit | 4547c9887353c6486873876e18f29ae91a5c84b4 (patch) | |
tree | 4597a524c2d3029f6249a86878a60f870762e1dd /src/Process.hs | |
parent | b590f9cbd4cfca3daa33786186837e77b0824387 (diff) |
Changelog: Change working directory of spawned process to node directory
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 48ed40f..376b1ba 100644 --- a/src/Process.hs +++ b/src/Process.hs @@ -93,7 +93,8 @@ spawnOn target pname killWith cmd = do 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)] + , cwd = Just (either netDir nodeDir target) + , env = Just [ ( "EREBOS_DIR", "." ) ] } pout <- liftIO $ newTVarIO [] |