/usr/lib/swipl/library/ext/clib/process.pl
All Application Manual Name SummaryHelp

  • ext
    • clib
      • socket.pl -- Network socket (TCP and UDP) library
      • uid.pl -- User and group management on Unix systems
      • unix.pl -- Unix specific operations
      • syslog.pl -- Unix syslog interface
      • memfile.pl
      • time.pl -- Time and alarm library
      • uri.pl -- Process URIs
      • filesex.pl -- Extended operations on files
      • uuid.pl -- Universally Unique Identifier (UUID) Library
      • sha.pl
      • process.pl -- Create processes and redirect I/O
        • process_create/3
        • process_which/2
        • process_id/1
        • process_id/2
        • is_process/1
        • process_release/1
        • process_wait/2
        • process_wait/3
        • process_kill/1
        • process_kill/2
        • process_group_kill/1
        • process_group_kill/2
        • process_set_method/1
      • hash_stream.pl -- Maintain a hash on a stream
      • md5.pl -- MD5 hashes
      • rlimit.pl
      • mallocinfo.pl -- Memory allocation details
      • prolog_stream.pl -- A stream with Prolog callbacks
      • streampool.pl -- Input multiplexing
      • crypt.pl
      • udp_broadcast.pl
      • cgi.pl
      • prolog_server.pl
 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-win app.
[115, 119, 105, 112, 108, 45, 119, 105, 110]
Run the swipl-win app, 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 rolog, 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
                   ]).