alice
library
manual.

Alice Project

The OS.Process structure


________ Synopsis ____________________________________________________

    signature OS_PROCESS
    structure Process : OS_PROCESS
  

An extension of the Standard ML Basis' OS.Process structure.

See also: OS, Thread


________ Import ______________________________________________________

Imported implicitly.


________ Interface ___________________________________________________

    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
  

________ Description _________________________________________________

Items not described here are as in the Standard ML Basis' OS.Process structure.

Limitations:

atExn f

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.



last modified 2007/Mar/30 17:10