fgof-jobs Public
Go to file
T
Code
Use Git or checkout with SVN using the web URL.
No matching headings.
fgof-jobs
Background job, process-group, and wait-model helpers for modern Fortran.
fgof-jobs is intended to be a small, standalone library for the parts of job
control that shells, supervisors, and long-running tool hosts usually end up
rebuilding locally.
It is part of the FortranGoingOnForty lib-modules
catalog, but it is intended to stand on its own as a normal fpm package.
Current v1 target:
- stable job spec, job handle, and job result types
- job-state helpers that can support foreground and background process groups
- room for wait, signal, and pipeline helpers without forcing shell UI policy
Future scope:
- pipeline helpers layered over
fgof-process - signal and terminal handoff helpers
- examples for shell-like and tool-runner workflows
Status
Sprint 04 is in place.
Tracked today:
- package layout, CI, and standalone repo setup
- foundational job types for specs, handles, and results
- explicit configure, attach, complete, and release lifecycle helpers
- explicit process-group ownership tracking on job handles
- wait-result constructors for exited, signaled, stopped, and continued outcomes
- state-transition helpers that distinguish stopped jobs from terminal jobs
- grouped pipeline-member tracking on job handles
- explicit signal-forwarding and terminal-handoff policy fields
- pipeline-aware stop, continue, and completion aggregation
- tracked examples for lifecycle and pipeline state transitions
- replacement-safe pipeline member attachment and cleaner group-stop member results
- CI now runs both tests and tracked examples
Public API Shape
Primary modules:
fgof_jobsfgof_jobs_types
Public types:
job_specjob_handlejob_result
Current public procedures:
clear_job_specclear_job_handleclear_job_resultmake_job_specconfigure_jobattach_jobattach_pipeline_memberscomplete_jobobserve_wait_resultrelease_jobclear_job_memberjob_exit_resultjob_signal_resultjob_stop_resultjob_continue_resultjob_is_configuredjob_is_runningjob_is_stoppedjob_is_finishedjob_needs_cleanupjob_owns_process_groupjob_signal_scopejob_resume_sends_sigcontjob_requires_terminal_handoffpipeline_member_countjobs_backend_name
Current semantics:
job_speccarries the intended command, argument vector, and foreground/background intentmake_job_spec()builds a reusable spec value for later launch or attach workconfigure_job()resets a handle into a configured-but-not-running state from a specattach_job()records pid/process-group identity for an already launched job and establishes both process and process-group ownership expectationsattach_pipeline_members()binds one handle to multiple tracked member pids for pipeline-style jobsjob_exit_result(),job_signal_result(),job_stop_result(), andjob_continue_result()build explicit wait outcomes for later launch or wait backendsobserve_wait_result()applies non-terminal and terminal wait state transitions to a tracked handle and now updates pipeline members toocomplete_job()now models terminal completion only and clears runtime cleanup obligations after exit or signal outcomesrelease_job()drops cleanup ownership while preserving runtime tracking metadatajob_is_configured(),job_is_running(),job_is_stopped(),job_is_finished(),job_needs_cleanup(), andjob_owns_process_group()expose the current stable lifecycle predicatesjob_signal_scope(),job_resume_sends_sigcont(), andjob_requires_terminal_handoff()make signal and terminal assumptions explicit for future backendsjob_handleis now the explicit ownership point for a launched job group, and may track member-level pipeline statejob_resultnow carries pid/process-group identity plus exited, signaled, stopped, and continued wait outcomes- grouped pipeline jobs only finish once all tracked members have reached terminal outcomes
- reattaching pipeline members replaces the previous tracked member set cleanly
- group-scoped stop fanout preserves each tracked member pid in member-level results
jobs_backend_name()currently reports the planned backend family and exists to stabilize the package surface early
Build And Test
fpm test
Tracked examples:
Supported Platforms
- macOS
- Linux
Boundaries
- intended to stay independently versioned and releasable
- focused on reusable job-control mechanics first, not full shell policy
- should remain useful on its own even if future shells or supervisors build on top
License
MIT