job-control Module

Job Control in Idio is very closely allied to the description of Job Control in the GNU libc manual.

Almost all of Idio’s Job Control is written in Idio meaning it is “easy” to augment. Some behaviour still uses the equivalent functionality in the C code base.

Many activities occur in the execution of a job from arranging I/O, pipelines, fork/exec and determining whether or not the command actually succeeded.

All of the individual activities can raise conditions however the primary condition raised by job-control is ^rt-command-status-error.

In Idio we want to know that processes have failed and not failed silently.

If, when a job completes, its reason for exiting is not exit (0) then such a condition is raised with the original Unix status value, indicating either exit n or killed signal.

The default handler for ^rt-command-status-error will cause idio to exit in the same way.

You can suppress this behaviour by setting suppress-exit-on-error! to any true value.

In addition suppress-pipefail! controls whether any “left-hand” processes in a pipeline that do not exit (0) cause a condition to be raised.

As a separate category, Process Substitution commands, also called asynchronous commands, here, can fail. We’d like to know about that although, as an asynchronous command has no bearing on the control flow, it is handled by raising an ^rt-async-command-status-error.

The default handler for ^rt-async-command-status-error will invoke condition-report.

You can suppress this behaviour by setting suppress-async-command-report! to any true value.

Last built at 2024-05-02T06:10:51Z+0000 from 62cca4c (dev) for Idio 0.3.b.6