Running sub-processes

This is the most general way to spawn an external process. The
process can be a command line to be executed by a shell or a raw command
with a list of arguments. The stdin, stdout, and stderr streams of
the new process may individually be attached to new pipes, to existing
Handles, or just inherited from the parent (the default.)

The details of how to create the process are passed in the
CreateProcess record. To make it easier to construct a
CreateProcess, the functions proc and shell are supplied that
fill in the fields with default values which can be overriden as
needed.

Runs a command using the shell, and returns Handles that may
be used to communicate with the process via its stdin, stdout,
and stderr respectively. The Handles are initially in binary
mode; if you need them to be in text mode then use hSetBinaryMode.

readProcessWithExitCode creates an external process, reads its
standard output and standard error strictly, waits until the process
terminates, and then returns the ExitCode of the process,
the standard output, and the standard error.

The computation rawSystem cmd args runs the operating system command
cmd in such a way that it receives as arguments the args strings
exactly as given, with no funny escaping or shell meta-syntax expansion.
It will therefore behave more portably between operating systems than system.

Attempts to terminate the specified process. This function should
not be used under normal circumstances - no guarantees are given regarding
how cleanly the process is terminated. To check whether the process
has indeed terminated, use getProcessExitCode.

On Unix systems, terminateProcess sends the process the SIGTERM signal.
On Windows systems, the Win32 TerminateProcess function is called, passing
an exit code of 1.