Posix.ProcEnv
structureThe structure Posix.ProcEnv specifies functions, as described in Section 4 of the IEEE Std 1003.1b-1993, that provide primitive POSIX access to the process environment.
signature POSIX_PROC_ENV
structure ProcEnv
: POSIX_PROC_ENV
eqtype pid
eqtype uid
eqtype gid
eqtype file_desc
val uidToWord : uid -> SysWord.word
val wordToUid : SysWord.word -> uid
val gidToWord : gid -> SysWord.word
val wordToGid : SysWord.word -> gid
val getpid : unit -> pid
val getppid : unit -> pid
val getuid : unit -> uid
val geteuid : unit -> uid
val getgid : unit -> gid
val getegid : unit -> gid
val setuid : uid -> unit
val setgid : gid -> unit
val getgroups : unit -> gid list
val getlogin : unit -> string
val getpgrp : unit -> pid
val setsid : unit -> pid
val setpgid : {pid : pid option, pgid : pid option} -> unit
val uname : unit -> (string * string) list
val time : unit -> Time.time
val times : unit -> {elapsed : Time.time, utime : Time.time, stime : Time.time, cutime : Time.time, cstime : Time.time}
val getenv : string -> string option
val environ : unit -> string list
val ctermid : unit -> string
val ttyname : file_desc -> string
val isatty : file_desc -> bool
val sysconf : string -> SysWord.word
eqtype pid
eqtype uid
eqtype gid
eqtype file_desc
uidToWord u
wordToUid i
gidToWord g
wordToGid i
getpid ()
getppid ()
getuid ()
geteuid ()
getgid ()
getegid ()
setuid u
setgid g
getgroups ()
getlogin ()
getpgrp ()
setsid ()
setpgid {pid, pgid}
uname ()
(name,value)
including, at least, the names: "sysname", "nodename", "release", "version", and "machine". (A POSIX implementation may provide additional values beyond this set.) The respective values are strings that describe the named system component.
time ()
times ()
elapsed
), user time (utime
), system time (stime
), user CPU time of terminated child processes (cutime
), and system CPU time of terminated child processes (cstime
).
getenv name
name
=value
and returns SOME(value)
if name
is present; returns NONE
if name
is not present. This is equivalent to OS.Process.getEnv.
environ ()
ctermid ()
ttyname fd
isatty fd
true
if fd is a valid file descriptor associated with a terminal. Note that isatty will return false
if fd is a bad file descriptor.
sysconf s
The documentation herein is intended as a synopsis of the POSIX process-environment functionality; consult Section 4 of the IEEE Std 1003.1b-1993 for detailed discussions.
Posix.ProcEnv, Posix.FileSys, Time, OS
Last Modified April 17, 1996
Copyright © 1996 AT&T