job-control structures

struct %idio-job
Field:

pipeline

Field:

procs

Field:

pgid

Field:

notify-stopped

Field:

notify-completed

Field:

raise?

Field:

raised

Field:

tcattrs

Field:

stdin

Field:

stdout

Field:

stderr

Field:

report-timing

Field:

timing-start

Field:

timing-end

Field:

async

Field:

set-exit-status

Canonical:

job-control/%idio-job

  • pipeline is a list of the original commands in the pipeline

  • procs is a list of the %idio-process structures, one per element of pipeline

  • pgid is the Process Group ID of the pipeline

  • notify-stopped is a flag to say whether the job being stopped has been reported

  • notify-completed is a flag to say whether any failure on job completion has been reported

    Notably, this is disabled in logical expressions.

  • raise? is a flag to say whether any failure on job completion should have an ^rt-command-status-error / ^rt-async-command-status-error condition raised

    Notably, this is disabled in logical expressions thus allowing external commands that fail to be used.

  • raised is a flag to say whether any failure on job completion has had a condition raised

  • tcattrs is a struct-termios

  • stdin indicates the overall job stdin

  • stdout indicates the overall job stdout

  • stderr indicates the overall job stderr

  • report-timing is a flag to indicate that a timing report should be generated on job completion

  • timing-start is a list of

    1. struct-timeval

    2. struct-rusage for libc/RUSAGE_SELF

    3. struct-rusage for libc/RUSAGE_CHILDREN

  • timing-end will be a list of

    1. struct-timeval

    2. struct-rusage for libc/RUSAGE_SELF

    3. struct-rusage for libc/RUSAGE_CHILDREN

  • async is a flag indicating the job is asynchronous and normally set for Process Substitution jobs

  • set-exit-status is a flag indicating whether the job should update the pending Idio exit status

function job-control/%idio-job? o

Is o an %idio-job?

Param o:

value to test

Return:

boolean

function job-control/make-%idio-job ...

create an %idio-job from

Param …:

values for %idio-job

Return:

%idio-job

Rtype:

struct-instance

struct %idio-process
Field:

argv

Field:

exec

Field:

pid

Field:

completed

Field:

stopped

Field:

status

Canonical:

job-control/%idio-process

  • argv is a list of the original arguments in the process

  • exec is unused

  • pid is the Process ID of the process

  • completed is a flag indicating if the process has completed

  • stopped is a flag indicating if the process has been stopped (with SIGSTOP)

  • status if set, is a C/pointer to the process status as returned by waitpid

function job-control/%idio-process? o

Is o an %idio-process?

Param o:

value to test

Return:

boolean

function job-control/make-%idio-process ...

create an %idio-process from

Param …:

values for %idio-process

Return:

%idio-process

Rtype:

struct-instance

struct %process-substitution-job
Field:

read

Field:

fd

Field:

path

Field:

dir

Field:

suppress

Canonical:

job-control/%process-substitution-job

function job-control/%process-substitution-job? o

Is o an %process-substitution-job?

Param o:

value to test

Return:

boolean

function job-control/make-%process-substitution-job ...

create an %process-substitution-job from

Param …:

values for %process-substitution-job

Return:

%process-substitution-job

Rtype:

struct-instance

function job-control/add-process-substitution-job job psj

Update the set of process substitution jobs with new job job.

Param job:

new job

Type job:

an instance of %idio-job

Param job:

process substituion details

Type job:

an instance of %process-substitution-job

function job-control/tidy-process-substitution-job job

Update the set of process substitution jobs on the completion of job job

Param job:

completed job

Type job:

an instance of %idio-job

This may involve active closing of file descriptors and/or removal of entries in the file system.

Last built at 2024-12-21T07:10:40Z+0000 from 62cca4c (dev) for Idio 0.3.b.6