From 037150979ff809df85757bd2b3f676e2e4c6be88 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Tue, 17 Jan 2012 12:28:32 +0100 Subject: Move types and specs from erl_bif_types.erl to modules --- lib/kernel/doc/src/os.xml | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) (limited to 'lib/kernel/doc/src/os.xml') diff --git a/lib/kernel/doc/src/os.xml b/lib/kernel/doc/src/os.xml index e94119845a..1bc5b9e464 100644 --- a/lib/kernel/doc/src/os.xml +++ b/lib/kernel/doc/src/os.xml @@ -4,7 +4,7 @@
- 19972011 + 19972012 Ericsson AB. All Rights Reserved. @@ -73,7 +73,7 @@ DirOut = os:cmd("dir"), % on Win32 platform - getenv() -> [string()] + List all environment variables

Returns a list of all environment variables. @@ -83,55 +83,41 @@ DirOut = os:cmd("dir"), % on Win32 platform - getenv(VarName) -> Value | false + Get the value of an environment variable - - VarName = string() - Value = string() - -

Returns the Value of the environment variable - VarName, or false if the environment variable +

Returns the Value of the environment variable + VarName, or false if the environment variable is undefined.

- getpid() -> Value + Return the process identifier of the emulator process - - Value = string() -

Returns the process identifier of the current Erlang emulator in the format most commonly used by the operating system - environment. Value is returned as a string containing + environment. Value is returned as a string containing the (usually) numerical identifier for a process. On Unix, this is typically the return value of the getpid() - system call. On VxWorks, Value contains the task id + system call. On VxWorks, Value contains the task id (decimal notation) of the Erlang task. On Windows, the process id as returned by the GetCurrentProcessId() system call is used.

- putenv(VarName, Value) -> true + Set a new value for an environment variable - - VarName = string() - Value = string() - -

Sets a new Value for the environment variable - VarName.

+

Sets a new Value for the environment variable + VarName.

- timestamp() -> Timestamp + + Timestamp = {MegaSecs, Secs, MicroSecs} Returna a timestamp from the OS in the erlang:now/0 format - - Timestamp = {MegaSecs, Secs, MicroSecs} = erlang:timestamp() - MegaSecs = Secs = MicroSecs = integer() >= 0 -

Returns a tuple in the same format as erlang:now/0. The difference is that this function returns what the operating system thinks (a.k.a. the wall clock time) without any attempts at time correction. The result of two different calls to this function is not guaranteed to be different.

The most obvious use for this function is logging. The tuple can be used together with the function calendar:now_to_universal_time/1 -- cgit v1.2.3