uce/site/doc/pages/job_cancel.txt
2026-06-16 23:02:45 +00:00

13 lines
305 B
Plaintext

# job_cancel
Attempts to terminate the background job process group and marks the registry entry as `cancelled`.
:see
>sys
:example
DValue spec; spec["cmd"] = "sleep 5"; spec["timeout_ms"] = (f64)10000;
u64 job = shell_spawn(spec);
print(job_cancel(job) ? "job cancelled" : "could not cancel", "\n");