Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Defines Cmd
, the core API of Procex.
Synopsis
- data Cmd
- makeCmd' :: ByteString -> Cmd
- passArg :: ByteString -> Cmd -> Cmd
- unIOCmd :: IO Cmd -> Cmd
- postCmd :: (Either SomeException (Async ProcessStatus) -> IO ()) -> Cmd -> Cmd
- run' :: Cmd -> IO (Async ProcessStatus)
- runReplace :: Cmd -> IO ()
- passFd :: (Fd, Fd) -> Cmd -> Cmd
- passArgFd :: Fd -> Cmd -> Cmd
- passNoFd :: Fd -> Cmd -> Cmd
Documentation
Instances
makeCmd' :: ByteString -> Cmd Source #
unIOCmd :: IO Cmd -> Cmd Source #
Embeds the IO action inside the command, such that the IO action is executed when the command is executed.
postCmd :: (Either SomeException (Async ProcessStatus) -> IO ()) -> Cmd -> Cmd Source #
Executes some code after launching the process. If launching the process fails, it will be provided with the exception it failed with.
run' :: Cmd -> IO (Async ProcessStatus) Source #
Runs the specified command asynchronously and returns the process status.
runReplace :: Cmd -> IO () Source #
Runs the specified commands and replaces the current process with it. This will not return unless an error occurs while executing the process.
Bind a fd in the new process to a fd available now. If you try to bind an fd already bound, it will simply replace the older binding.