Process module:System -package:unix -is:module -package:typed-process -package:Win32
Process a list of flags (usually obtained from
getArgs/expandArgsAt) with a mode. Returns
Left and an error message if the command line fails to parse,
or Right and the associated value.
A handle to a process, which can be used to wait for termination of
the process using waitForProcess
None of the process-creation functions in this library wait for
termination: they all return a ProcessHandle
which may be used
to wait for the process later.
On Windows a second wait method can be used to block for event
completion. This requires two handles. A process job handle and a
events handle to monitor.
CPU options impacting cryptography implementation and library
The identifier of the CPU-time clock associated with the calling
process. For this clock, the value returned by getTime
represents the amount of execution time of the current process.
This will always come first, before any output or exit code.
A convenient handler for the output of a createProcess
This data containes 4 components:
Process the flags obtained by getArgs
with a mode. Displays an error and exits
with failure if the command line fails to parse, or returns the
associated value. Implemented in terms of process
function makes use of the following environment variables:
- $CMDARGS_COMPLETE - causes the program to produce
completions using complete, then exit. Completions are based on
the result of getArgs, the index of the current argument is
taken from $CMDARGS_COMPLETE (set it to - to
complete the last argument), and the index within that argument is
taken from $CMDARGS_COMPLETE_POS (if set).
- $CMDARGS_HELPER/$CMDARGS_HELPER_PROG -
uses the helper mechanism for entering command line programs as
described in System.Console.CmdArgs.Helper.
Process a list of flags (usually obtained from getArgs
) with a mode. Throws an error if the
command line fails to parse, or returns the associated value.
Implemeneted in terms of process
. This function does not take
account of any environment variables that may be set (see
If you are in IO
you will probably get a better user experience
by calling processValueIO
but on failure prints to stderr and exits the