Description
(discussed via email with @matthewrmshin)
At this point Cylc handles background jobs almost like batch system jobs (without the batch-system-supplied resource awareness and external queuing of course): the jobs are detached from the "submission" process, and they get killed with SIGXCPU on exceeding their execution time limit.
The final step is to send SIGTERM to kill a job before (if necessary) a final SIGKILL. Currently we go straight to SIGKILL, which is definitive but it doesn't allow the job script to update the job.status file before it dies (which has minor consequences for subsequent job polling: we have to query the batch system instead of just getting the kill result from the status file).
In Matt's words:
1st kill command with SIGTERM. If job does not send back a failed message within a few moment, issue 2nd kill command with SIGKILL. For completeness, the "cylc jobs-kill" command can probably modify the "job.status" file to indicate what it has done (so far) as well.