The Standard ML Basis Library


The Posix structure


Synopsis

signature POSIX  (* OPTIONAL *)
structure Posix :> POSIX  (* OPTIONAL *)

This optional structure contains several substructures that are useful for interfacing to POSIX operating systems. For more complete information on the semantics of the types and functions provided in Posix, see the POSIX standard 1003.1,1996 document[CITE].


Interface

structure Error : POSIX_ERROR
structure Signal : POSIX_SIGNAL
structure Process : POSIX_PROCESS
  where type signal = Signal.signal
structure ProcEnv : POSIX_PROC_ENV
  where type pid = Process.pid
structure FileSys : POSIX_FILE_SYS
  where type file_desc = ProcEnv.file_desc
  where type uid = ProcEnv.uid
  where type gid = ProcEnv.gid
structure IO : POSIX_IO
  where type pid = Process.pid
  where type file_desc = ProcEnv.file_desc
  where type open_mode = FileSys.open_mode
structure SysDB : POSIX_SYS_DB
  where type uid = ProcEnv.uid
  where type gid = ProcEnv.gid
structure TTY : POSIX_TTY
  where type pid = Process.pid
  where type file_desc = ProcEnv.file_desc

Description

structure Error : POSIX_ERROR
Errors and their descriptions.

structure Signal : POSIX_SIGNAL
Signal values and their associated numbers.

structure Process : POSIX_PROCESS
Processes: fork, exec, wait, exit, kill, alarm, pause, sleep.

structure ProcEnv : POSIX_PROC_ENV
User and group IDs, process times, environment, etc.

structure FileSys : POSIX_FILE_SYS
File system: open, chdir, chmod, directories, etc.

structure IO : POSIX_IO
Input/output: read, write, pipe, dup, close, lock, seek, sync, etc.

structure SysDB : POSIX_SYS_DB
Password database, group database, etc.

structure TTY : POSIX_TTY
Terminal (TTY) control: speed, attributes, drain, flush, etc.

See Also

Posix.Error, Posix.FileSys, Posix.IO, Posix.ProcEnv, Posix.Process, Posix.Signal, Posix.SysDB, Posix.TTY

Discussion

The Posix structure and signatures are optional as a group; i.e., they are either all present or all absent. Furthermore, if they are present, then the SysWord structure must also be provided by the implementation, but note that an implementation may provide the SysWord structure without providing the Posix structure.

Many functions in the Posix structure can raise OS.SysErr for many reasons. The description of an individual function will usually not describe all of the causes for the exception, or all of the system errors (see OS.syserror and Posix.Error.syserror) carried by the exception. The programmer will need to consult more detailed POSIX documentation.


[ Top | Parent | Contents | Index | Root ]

Generated October 02, 2003
Last Modified July 1, 2002
Comments to John Reppy.


This document may be distributed freely over the internet as long as the copyright notice and license terms below are prominently displayed within every machine-readable copy.

Copyright © 2003 AT&T and Lucent Technologies. All rights reserved.

Permission is granted for internet users to make one paper copy for their own personal use. Further hardcopy reproduction is strictly prohibited. Permission to distribute the HTML document electronically on any medium other than the internet must be requested from the copyright holders by contacting the editors. Printed versions of the SML Basis Manual are available from Cambridge University Press. To order, please visit www.cup.org (North America) or www.cup.cam.ac.uk (outside North America).