[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.7.1 Operating System interface
- bigloo procedure: bigloo-config
- bigloo procedure: bigloo-config key
The function
bigloo-config
returns an alist representing the configuration of the running Bigloo system. When used with one parameter, the functionbigloo-config
returns the value associated with the key.Examples:
(bigloo-config) ⇒ ((release-number . 3.4b) ... (endianess . little-endian)) (bigloo-config 'endianess) ⇒ little-endian
- bigloo procedure: register-exit-function! proc
Register proc as an exit functions. Proc is a procedure accepting of one argument. This argument is the numerical value which is the status of the exit call. The registered functions are called when the execution ends.
- bigloo procedure: exit int
Apply all the registered exit functions then stops an execution, returning the integer int.
- bigloo procedure: signal n proc
Provides a signal handler for the operating system dependent signal n. proc is a procedure of one argument.
- bigloo procedure: get-signal-handler n
Returns the current handler associated with signal n or
#f
if no handler is installed.
- bigloo procedure: system . strings
Append all the arguments strings and invoke the native host
system
command on that new string which returns an integer.
- bigloo procedure: system->string . strings
Append all the arguments strings and invoke the native host
system
command on that new string. If the command completes,system->string
returns a string made of the output of the command.
- bigloo procedure: getenv string
Returns the string value of the Unix shell’s string variable. If no such variable is bound,
getenv
returns#f
.
- bigloo procedure: putenv string val
Adds or modifies the global environment variable string so that it is bound to val after the call. This facility is not supported by all back-end. In particular, the JVM back-end does not support it.
- bigloo procedure: date
Returns the current date in a
string
. See also Date.
- bigloo procedure: os-charset
Gives the charset used for encoding names of the file system (e.g. ‘UTF-8’).
For additional functions (such as directory->list
)
see Input and output.
- bigloo procedure: unix-path->list
Converts a Unix path to a Bigloo list of strings.
(unix-path->list ".") ⇒ (".") (unix-path->list ".:/usr/bin") ⇒ ("." "/usr/bin")
- bigloo procedure: time thunk
Evaluates the thunk and returns four values: the result of calling thunk, the actual execution time, the system time, and the user time in millisecond.
(multiple-value-bind (res rtime stime utime) (time (lambda () (fib 35))) (print "real: " rtime " sys: " stime " user: " utime))
- bigloo procedure: getuid
- bigloo procedure: setuid uid
The procedure
getuid
returns the UID of the user the current process is executed on behalf of.The procedure
setuid
set the UID of the current process. In case of failure, this procedure raises an error.
- bigloo procedure: getpwnam name
- bigloo procedure: getpwuid uid
These two procedures returns information about a user. The procedure
getpwname
accepts a string denoting the user name as argument. The proceduregetpwuid
accepts an UID as returned by the proceduregetuid
.If the user is found, these two procedures returns a list of seven elements:
- the user name,
- his encrypted password,
- his uid,
- his group id,
- his real name,
- his home directory,
- his preferred shell.
When no user is found, these procedures returns
#f
.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on October 23, 2011 using texi2html 5.0.