- ext
- clib
- socket.pl
- uid.pl
- unix.pl -- Unix specific operations
- syslog.pl -- Unix syslog interface
- filesex.pl
- uri.pl
- process.pl -- Create processes and redirect I/O
- sha.pl
- crypt.pl
- memfile.pl
- uuid.pl
- time.pl -- Time and alarm library
- hash_stream.pl -- Maintain a hash on a stream
- md5.pl
- desktop.pl -- Interact with the desktop environment
- clib
- prolog_executable(+Tool, -Exe, +ArgvIn, -Argv) is det[multifile, library(process)]
- prolog:prolog_tool(+Tool, -Exe, +ArgvIn, -Argv) is semidet[multifile, library(process)]
- Find the executable and commandline arguments for running Tool. This
provides a hook for process_create/3 called as
process_create(prolog(Tool), ...). Tool is currently one of:- [115, 101, 108, 102]
- Run Prolog itself.
- [115, 119, 105, 112, 108]
- Run the commandline version, also when called from the
swipl-winapp. - [115, 119, 105, 112, 108, 45, 119, 105, 110]
- Run the
swipl-winapp, also when called from the commandline version. - [115, 119, 105, 112, 108, 45, 108, 100]
- Run the C/C++ compiler frontend to embed Prolog or build foreign extensions.
prolog:prolog_tool/4 is defined as multifile and dynamic and can be used for special cases. This hook is notably intended to provide a portable way of calling Prolog when Prolog is embedded.
For example, when using rswipl, we can run Prolog using
R -s -e 'rswipl::swipl()' --args <Prolog Argv>
We can make
process_create(prolog(swipl), ...)work using:- multifile prolog:prolog_tool/4. prolog:prolog_tool(swipl, path('R'), Argv, [ '-s', '-e', 'rswipl::swipl()', '--args' | Argv ]).