Process +System -base
This package contains libraries for dealing with system processes.
Version 1.1.0.1
This package contains libraries for dealing with system processes. Temporary version for use in leksah until main process library is updated.
Version 1.0.1.4
Quasi-Quoters for exec process
Version 0.2.0
POSIX process support. See also the System.Cmd and System.Process modules in the process package.
Operations for creating and interacting with sub-processes.
See module docs for more information, and "cv-combinators" package for example usage.
Version 0.0.2
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.
createProcess returns (mb_stdin_hdl, mb_stdout_hdl, mb_stderr_hdl, p),
* if std_in == CreatePipe, then mb_stdin_hdl will be Just h, connected to the child process's stdin.
* otherwise, mb_stdin_hdl == Nothing
Similarly for mb_stdout_hdl and mb_stderr_hdl.
For example, to execute a simple ls command:
> r <- createProcess (proc "ls" [])
To create a pipe from which to read the output of ls:
> (_, Just hout, _, _) <-
> createProcess (proc "ls" []){ std_out = CreatePipe }
To also set the directory in which to run ls:
> (_, Just hout, _, _) <-
> createProcess (proc "ls" []){ cwd = Just "\home\bob",
> std_out = CreatePipe }
createProcessGroup pid calls setpgid to make process pid a new process group leader. This function is currently deprecated, and might be changed to making the current process a new process group leader in future versions.
Show more results