![]() | Library Documentation | Structures | Signatures | Identifiers | Packages | About |
OS_PROCESS (basis)Operating system processes.
structure Process : OS_PROCESS (basis)
signature OS_PROCESS =
sig
type status
val success : status
val failure : status
val isSuccess : status -> bool
val system : string -> status
val atExit : (unit -> unit) -> unit
val exit : status -> 'a
val terminate : status -> 'a
val getEnv : string -> string option
val sleep : Time.time -> unit
end
If the argument to exit comes from system or some other function
(such as Unix.reap) returning a status value, then the
implementation should attempt to preserve the meaning of the exit
code from the subprocess. For example, on a POSIX system, if
Posix.Process.fromStatus st yields Posix.Process.W_EXITSTATUS v,
then v should be passed to Posix.Process.exit after all necessary
cleanup is done.
If st does not connote an exit value, exit should act as though
called with failure. For example, on a POSIX system, this would
occur if Posix.Process.fromStatus st is Posix.Process.W_SIGNALED
or Posix.Process.W_STOPPED.