capture :: Fd -> String -> [String] -> IO ()
capture wfd name portNames =
    Jack.handleExceptions $ flip MC.runContT return $ do
        client <- MC.ContT $ Jack.withClientDefault name
        inputs <- mapM (MC.ContT . Jack.withPort client) portNames
        Trans.lift $ setProcess wfd client inputs
        Trans.lift $ Jack.withActivation client $ Trans.lift $ do
            putStr $ "started " ++ name ++ "..."
            Jack.waitForBreak
capture :: Fd -> String -> [String] -> IO ()
capture wfd name portNames =
    Jack.handleExceptions $ flip MC.runContT return $ do
        client <- MC.ContT $ Jack.withClientDefault name
        inputs <- mapM (MC.ContT . Jack.withPort client) portNames
        Trans.lift $ setProcess wfd client inputs
        Trans.lift $ Jack.withActivation client $ Trans.lift $ do
            putStr $ "started " ++ name ++ "..."
            Jack.waitForBreak
capture wfd name portNames =
    Jack.handleExceptions $ flip MC.runContT return $ do
        client <- MC.ContT $ Jack.withClientDefault name
        inputs <- mapM (MC.ContT . Jack.withPort client) portNames
        Trans.lift $ setProcess wfd client inputs
        Trans.lift $ Jack.withActivation client $ Trans.lift $ do
            putStr $ "started " ++ name ++ "..."
            Jack.waitForBreak