The OS.Process structure provides functions for manipulating processes in an operating system independent manner. For discussion of additional relations between this structure and other structures, see Section 11.1.
val success : status
val failure : status
val system : string -> status
val atExit : (unit -> unit) -> unit
val exit : status -> 'a
val terminate : status -> 'a
val getEnv : string -> string option
statustype represents various termination conditions for processes. On Posix-based systems, status will be be int.
Note that, although this function is independent of the operating system, the interpretation of the string cmd depends very much on the underlying operating system and shell.
Exceptions raised when f is invoked that escape it are trapped and ignored. Calls in f to atExit are ignored. Calls to exit do not return, but should cause the remainder of the functions registered with atExit to be executed. Calls to terminate (or similar functions such as Posix.Process.exit) will terminate the process immediately.
OS, OS.FileSys, OS.Path, OS.IO, Posix.ProcEnv, Posix.Process
Last Modified September 1, 1997
Comments to John Reppy.
Copyright © 1997 Bell Labs, Lucent Technologies