úÎ<ü:)+      !"#$%&'()* The result of running a process +Construct a process result.  A value of 0& denotes success, otherwise, failure. *Construct a process result with the value 0. HReturns true if the given process result was constructed with the value 0, otherwise false. IReturns false if the given process result was constructed with the value 0, otherwise true. FReturns the value that the given process result was constructed with.  Computation   code throws  code. 1 Normally this terminates the program, returning code to the  program'6s caller. Before the program terminates, any open or ' semi-closed handles are first closed. >A program that fails in any other way is treated as if it had  called !. 8 A program that terminates successfully without calling   + explicitly is treated as it it had called    ExitSuccess. As an  is not an ,,   bypasses  the error handling in the -$ monad and cannot be intercepted by  ./ from the Prelude. However it is a 01 , and can " be caught using the functions of Control.Exception. This means & that cleanup computations added with 2  (from Control.Exception ) are also executed properly on  . Note: in GHC,  ( should be called from the main program @ thread in order to exit the process. When called from another  thread,   will throw an  ExitException as normal, but the 6 exception will not cause the process itself to exit. !The computation ! is equivalent to    ('exitCode exitfail'),  where exitfail is implementation-dependent. "The computation " is equivalent to    , It terminates the program  sucessfully. #Runs the first action. 9Only if the result is successful, run the second action. $Runs the second action. 8Only if the result is successful, run the first action. %<Run the structure of actions stopping at the first failure. &?readProcessWithExitCode creates an external process, reads its F standard output and standard error strictly, waits until the process " terminates, and then returns the  of the process, . the standard output, and the standard error.  readProcess and & are fairly simple wrappers  around  createProcess/. Constructing variants of these functions is ; quite easy: follow the link to the source code to see how   readProcess is implemented. ' Computation  system cmd) returns the exit code produced when the ) operating system runs the shell command cmd. This computation may fail with  PermissionDenied-: The process has insufficient privileges to  perform the operation.  ResourceExhausted*: Insufficient resources are available to  perform the operation.  UnsupportedOperation&: The implementation does not support  system calls.  On Windows, '+ passes the command to the Windows command  interpreter (CMD.EXE or  COMMAND.COM), hence Unixy shell tricks  will not work. (The computation ( cmd args# runs the operating system command  cmd1 in such a way that it receives as arguments the args strings J exactly as given, with no funny escaping or shell meta-syntax expansion. G It will therefore behave more portably between operating systems than '. ;The return codes and possible failures are the same as for '. )IWaits for the specified process to terminate, and returns its exit code. *"This is a non-blocking version of ). If the process is  still running, 3/ is returned. If the process has exited, then  4 e is returned where e" is the exit code of the process. 56+  !"#$%&'()*+  &'( !"#$%)* !"#$%&'()*7                      !"#$%&'()*+,-./01234/56/76/89/89/5:/;</;=>?@ Command-0.0.1System.Commandprocess-1.0.1.5System.ProcessterminateProcess readProcessrunInteractiveProcessrunInteractiveCommand createProcessshellproc runProcess runCommandSystem.Process.Internals ProcessHandle close_fdsstd_errstd_outstd_inenvcwdcmdspec CreateProcess ShellCommand RawCommandCmdSpecInherit UseHandle CreatePipe StdStreamExitCodeexitCodesuccess isSuccess isFailure exitValueexitWith exitFailure exitSuccess->><<- runExitCodesreadProcessWithExitCodesystem rawSystemwaitForProcessgetProcessExitCodebaseGHC.IO.ExceptionIOErrorghc-prim GHC.TypesIOControl.Exception.BasecatchSystem.IO.Error GHC.Exception SomeExceptionbracket Data.MaybeNothingJust toExitCode fromExitCode