Alice Project

The Unix structure

________ Synopsis ____________________________________________________

    signature UNIX
    structure Unix : UNIX

The Standard ML Basis' Unix structure.

See also: OS

________ Import ______________________________________________________

Imported implicitly.

________ Interface ___________________________________________________

    signature UNIX =
	type ('a,'b) proc
	type signal

	datatype exit_status =
	  | W_EXITSTATUS of Word8.word
	  | W_SIGNALED of signal
	  | W_STOPPED of signal

	val execute :   string * string list -> ('a,'b) proc
	val streamsOf : (TextIO.instream, TextIO.outstream) proc -> TextIO.instream * TextIO.outstream
	val reap :      ('a,'b) proc -> OS.Process.status
	val wait :      ('a,'b) proc -> OS.Process.status

________ Description _________________________________________________

Items not described here are like in the Standard ML Basis' Unix structure.

Limitations: The following functionality is currently missing:

wait pr

suspends the current process until the system process corresponding to pr terminates. Unlike reap it does not close input and output streams. It returns the exit status given by pr when it terminated. If wait or reap is applied again to pr, it should immediately return the previous exit status.

last modified 2007/Mar/30 17:10