hs-popen-0.1.0.0: Bindings to C pipe functions.

Safe HaskellSafe
LanguageHaskell2010

System.Process.Popen

Synopsis

Documentation

popen :: String -> PopenMode -> IO CStream Source #

Creates a stream, analog of C's popen

pclose :: CStream -> IO (Either () CInt) Source #

Closes a stream. Returns `Left ()` if the status code is -1 and the status code otherwise.

fileno :: CStream -> IO CInt Source #

Gets the file descriptor number from the stream.

withCStream :: CStream -> (Ptr () -> IO a) -> IO a Source #