finished_ok multimethod
Methods
- finished_ok(p:Process) Source: stdlib.ngs:4494
Decide whether process finished normally: exit code must be 0. Parameters
p any process Returns
bool
- finished_ok(p:Process) Source: stdlib.ngs:4500
Decide whether /bin/false process finished normally: exit code must be 1. Parameters
p /bin/false process Returns
bool
- finished_ok(p:Process) Source: stdlib.ngs:4510
Decide whether specific process finished normally: exit code must be 0 or 1. Parameters
p One of the processes: /usr/bin/test, {,/usr}/bin/fuser, {,/usr}/bin/ping Returns
boolExample
# 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:4517
Decide whether a process finished normally: OK for any process that has "nofail:" option Example
$(nofail: ls no-such-file)
- finished_ok(p:Process) Source: stdlib.ngs:4527
Decide whether a process finished normally: OK for exit codes given in "ok:" option Example
$(ok:2 ls no-such-file) $(ok:[0,1,2] ls no-such-file) $(ok:0..10 ls no-such-file) $(ok:10 ls no-such-file) # ProcessFail exception