- See also
- - https://sicstus.sics.se/sicstus/docs/3.12.11/html/sicstus/System-Utilities.html
- To be done
- - This library is incomplete.
As of SICStus 3.12.11, the following predicates are missing:
- environ(?Name, ?Value) is nondet
- True if Value is an atom associated with the environment variable
or system property Name.
- Compatibility
- - sicstus
- To be done
- - Mode -Name is not supported.
Because SWI-Prolog doesn't have an obvious equivalent to
SICStus system properties, this predicate currently
behaves as if no system properties are defined,
i. e. only environment variables are returned.
- exec(+Command, +Streams, -PID)
- SICStus 3 compatible implementation of exec/3 on top of the
SICStus 4 compatible process_create/3.
- bug
- - The SICStus version for Windows seems to hand Command
directly to CreateProcess(). We hand it to
%COMSPEC% /s /c "Command"
In case of conflict, it is adviced to use
process_create/3
- wait(+PID, -Status)
- Wait for processes created using exec/3.
- See also
- - exec/3
- pid(-PID)
- Process ID of the current process.
- Compatibility
- - sicstus.
- now(-When) is det
- Unify when with the current time-stamp
- Compatibility
- - sicstus
- datime(+When, -Datime) is det
- datime(-When, +Datime) is det
- True when Datime is a datime/6 record that reflects the time
stamp When.
- Compatibility
- - sicstus
- datime(-Datime) is det
- Unifies Datime with the current date and time as a datime/6
record of the form
datime(Year,Month,Day,Hour,Min,Sec)
. All
fields are integers.
- Compatibility
- - sicstus
- system
- system(+Command)
- system(+Command, -Status)
- Synomyms for shell/0, shell/1 and shell/2.
- Compatibility
- - sicstus.
- popen(+Command, +Mode, ?Stream)
-
- Compatibility
- - sicstus
- host_name(-HostName)
-
- See also
- - gethostname/1
- Compatibility
- - sicstus
- mktemp(+Template, -File) is det
- Interface to the Unix function. This emulation uses
tmp_file/2 and ignores Template.
- deprecated
- - This interface is a security-risc. Use
tmp_file_stream/3.
- Compatibility
- - sicstus
- tmpnam(-FileName)
- Interface to
tmpnam()
. This emulation uses tmp_file/2.
- deprecated
- - This interface is a security-risc. Use
tmp_file_stream/3.
- Compatibility
- - sicstus
- file_exists(+FileName) is semidet
- True if a file named FileName exists.
- Compatibility
- - sicstus
Re-exported predicates
The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.
- system
- system(+Command)
- system(+Command, -Status)
- Synomyms for shell/0, shell/1 and shell/2.
- Compatibility
- - sicstus.
- system
- system(+Command)
- system(+Command, -Status)
- Synomyms for shell/0, shell/1 and shell/2.
- Compatibility
- - sicstus.
- shell
- Execute an interactive shell. The following options are tried to
find a suitable shell command:
- The Prolog flag
shell
- The environment variable
$SHELL
- The Prolog flag
posix_shell
- The environment variable
%comspec%
(Windows only)
- Errors
- -
existence_error(config, shell)
if no suitable shell can be
found.
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- sleep(Arg1)
- make_directory(Arg1)
- rename_file(Arg1, Arg2)
- shell(Arg1, Arg2)
- working_directory(Arg1, Arg2)
- delete_file(Arg1)
- shell(Arg1)