OS.Process
structureThe 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.
signature OS_PROCESS
structure Process
: OS_PROCESS
eqtype status
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
eqtype status
status
type represents various termination conditions for processes. On Posix-based systems, status will be be int.
success
failure
system cmd
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.
atExit f
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.
exit st
terminate st
getEnv s
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