object
process
Portable process handling predicates.
logtalk_load(process(loader))static, context_switching_calls
Supported backend Prolog systems: ECLiPSe, GNU Prolog, SICStus Prolog, Shumway Prolog, SWI-Prolog, Trealla Prolog, and XVM.
Option
type/1limitation: This option is ignored on ECLiPSe, GNU Prolog, and XVM.
Public predicates
create/3
Creates a new process from the given executable and list of arguments. Supported options are process(Pid), stdin(Stream), stdout(Stream), stderr(Stream), and type(Type).
staticcreate(Executable,Arguments,Options)create(+atom,+list(atom),+list(compound)) - zero_or_onewait/2
Waits for a process to terminate and retrieves its exit status. The value of Status depends on the backend. For a successfully terminated process, Status is either 0 or exit(0).
staticwait(Pid,Status)wait(+integer,-integer_or_compound) - onewait/3
Waits once for a process to terminate, returning the backend-specific status in RawStatus and its normalized form in NormalizedStatus.
staticwait(Pid,RawStatus,NormalizedStatus)wait(+integer,-integer_or_compound,-compound) - one
Normalized status: Either
exit(Code),killed(Signal), orunknown(RawStatus)when native information is insufficient.GNU Prolog limitation: No distinction between processes that exited on their own with non-zero status and processes that were killed.
kill/2
Kills the given process with the specified signal (an integer or one of the following atoms: sighup, sigint, sigkill, or sigterm).
statickill(Pid,Signal)kill(+integer,+atom_or_integer) - zero_or_onekill/1
Kills the given process using the default signal (sigkill).
statickill(Pid)kill(+integer) - zero_or_oneProtected predicates
(none)
Private predicates
(none)
Operators
(none)
See also