object

# `process`

Portable process handling predicates.

Availability:
`logtalk_load(process(loader))`
Author: Paulo Moura
Version: 2:0:0
Date: 2026-06-30
Compilation flags:
`static, context_switching_calls`
Dependencies:
(none)
Remarks:

> - Supported backend Prolog systems: ECLiPSe, GNU Prolog, SICStus Prolog, SWI-Prolog, Trealla Prolog, and XVM.

> - Option `type/1` limitation: This option is ignored on ECLiPSe, GNU Prolog, Trealla Prolog, and XVM.

Inherited public predicates:
(none)

## 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)`.

Compilation flags:
`static`
Template:
`create(Executable,Arguments,Options)`
Mode and number of proofs:
`create(+atom,+list(atom),+list(compound))` - `zero_or_one`

### `wait/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)`.

Compilation flags:
`static`
Template:
`wait(Process,Status)`
Mode and number of proofs:
`wait(+process_or_pid,-integer_or_compound)` - `one`

### `kill/2`

Kills the given process with the specified signal (an integer or one of the following atoms: `sighup`, `sigint`, `sigkill`, or `sigterm`).

Compilation flags:
`static`
Template:
`kill(Process,Signal)`
Mode and number of proofs:
`kill(+process_or_pid,+atom_or_integer)` - `zero_or_one`

### `kill/1`

Kills the given process using the default signal (`sigkill`).

Compilation flags:
`static`
Template:
`kill(Process)`
Mode and number of proofs:
`kill(+process_or_pid)` - `zero_or_one`

## Protected predicates

(none)

## Private predicates

(none)

## Operators

(none)

See also

os