signature OS_PROCESS
structure Process : OS_PROCESS
An extension of the Standard ML Basis' OS.Process structure.
Imported implicitly.
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 atExn : (exn -> unit) -> unit
val exit : status -> 'a
val terminate : status -> 'a
val getEnv : string -> string option
val sleep : Time.time -> unit
end
Items not described here are as in the Standard ML Basis' OS.Process structure.
Limitations:
Registers an action f to be executed when the root thread of the running program terminates with an uncaught exception ex, which will be passed to f. Actions will be executed in the reverse order of registration. Exceptions raised when f is invoked that escape it are trapped and ignored. Calls in f to atExn are ignored. A call to exit, terminate, or similar functions will abort execution of the remaining registered actions. If all actions have been executed, the process is terminated, as if terminate had been called.