Methods

finished_okΒΆ

finished_ok(p:Process)

Decide whether process finished normally: exit code must be 0.
Source: stdlib.ngs:3108

p

any process

Returns

bool

finished_ok(p:Process)

Decide whether /bin/false process finished normally: exit code must be 1.
Source: stdlib.ngs:3114

p

/bin/false process

Returns

bool

finished_ok(p:Process)

Decide whether specific process finished normally: exit code must be 0 or 1.
Source: stdlib.ngs:3124

p

One of the processes: /usr/bin/test, /bin/fuser, /bin/ping

Returns

bool

Example

# Exit code 1 on the line below but no exception thanks to this finished_ok().
if $(test -f /) echo("/ is a file")  # Outputs nothing, / is a directory

finished_ok(p:Process)

Source: stdlib.ngs:3129