Next: , Previous: Time, Up: POSIX


6.2.6 Runtime Environment

— Scheme Procedure: program-arguments
— Scheme Procedure: command-line
— C Function: scm_program_arguments ()

Return the list of command line arguments passed to Guile, as a list of strings. The list includes the invoked program name, which is usually "guile", but excludes switches and parameters for command line options like -e and -l.

— Scheme Procedure: getenv nam
— C Function: scm_getenv (nam)

Looks up the string name in the current environment. The return value is #f unless a string of the form NAME=VALUE is found, in which case the string VALUE is returned.

— Scheme Procedure: setenv name value

Modifies the environment of the current process, which is also the default environment inherited by child processes.

If value is #f, then name is removed from the environment. Otherwise, the string name=value is added to the environment, replacing any existing string with name matching name.

The return value is unspecified.

— Scheme Procedure: unsetenv name

Remove variable name from the environment. The name can not contain a `=' character.

— Scheme Procedure: environ [env]
— C Function: scm_environ (env)

If env is omitted, return the current environment (in the Unix sense) as a list of strings. Otherwise set the current environment, which is also the default environment for child processes, to the supplied list of strings. Each member of env should be of the form NAME=VALUE and values of NAME should not be duplicated. If env is supplied then the return value is unspecified.

— Scheme Procedure: putenv str
— C Function: scm_putenv (str)

Modifies the environment of the current process, which is also the default environment inherited by child processes.

If string is of the form NAME=VALUE then it will be written directly into the environment, replacing any existing environment string with name matching NAME. If string does not contain an equal sign, then any existing string with name matching string will be removed.

The return value is unspecified.