process-listlike-0.10: Process extras

Safe HaskellNone

System.Process.ListLike.ReadNoThreads

Description

This is an alternative version of the module System.Process.ListLike.Read that doesn't use forkIO. I don't know of any advantages, I'm just including it because it is derived from old code I had developed, it is kinda badass, and maybe someone has a use for it.

Function to run a process and return a lazy list of chunks from standard output, standard error, and at the end of the list an object indicating the process result code. If neither output handle is ready for reading the process sleeps and tries again, with the sleep intervals increasing from 8 microseconds to a maximum of 0.1 seconds.

Synopsis

Documentation

class ListLikeLazyIO a c => ListLikeIOPlus a c whereSource

For the unthreaded implementation we need a more powerful ListLikeLazyIO class.

Methods

hPutNonBlocking :: Handle -> a -> IO aSource

chunks :: a -> [a]Source

Instances

ListLikeIOPlus ByteString Word8 
ListLikeIOPlus Text Char 

readCreateProcess :: forall a b c. (ListLikeIOPlus a c, ProcessOutput a b) => CreateProcess -> a -> IO bSource

readCreateProcessWithExitCode :: ListLikeIOPlus a c => CreateProcess -> a -> IO (ExitCode, a, a)Source

readProcessWithExitCode :: ListLikeIOPlus a c => FilePath -> [String] -> a -> IO (ExitCode, a, a)Source