From 27bf4a78b7203ed77790c92134213c3398214daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 30 Aug 2025 22:09:14 +0200 Subject: Add "ignore" command Changelog: Added `ignore` builtin command --- src/Script/Shell.hs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/Script') diff --git a/src/Script/Shell.hs b/src/Script/Shell.hs index 1c052b0..23c3891 100644 --- a/src/Script/Shell.hs +++ b/src/Script/Shell.hs @@ -123,6 +123,7 @@ executeScript sei@ShellExecInfo {..} pstdin pstdout pstderr (ShellScript stateme spawnShell :: Node -> ProcName -> ShellScript -> TestRun Process spawnShell procNode procName script = do procOutput <- liftIO $ newTVarIO [] + procIgnore <- liftIO $ newTVarIO ( 0, [] ) seiStatusVar <- liftIO $ newEmptyMVar ( pstdin, procStdin ) <- createPipeCloexec ( hout, pstdout ) <- createPipeCloexec @@ -139,12 +140,7 @@ spawnShell procNode procName script = do let procKillWith = Nothing let process = Process {..} - void $ forkTest $ lineReadingLoop process hout $ \line -> do - outProc OutputChildStdout process line - liftIO $ atomically $ modifyTVar procOutput (++ [ line ]) - void $ forkTest $ lineReadingLoop process herr $ \line -> do - outProc OutputChildStderr process line - + startProcessIOLoops process hout herr return process withShellProcess :: Node -> ProcName -> ShellScript -> (Process -> TestRun a) -> TestRun a -- cgit v1.2.3