5.4.10 Killing jobs
JP1/AJS3 kills an active job on receipt of a request to forcibly terminate a job or to forcibly stop the JP1/AJS3 services.
- Organization of this subsection
(1) Windows execution host
Forcibly terminating an active job kills the following processes on a Windows execution agent host:
-
Process started directly from JP1/AJS3 (job)
-
Process started by the jp1exec command (command process)
To kill these processes, the Windows OS calls the Win32API TerminateProcess function. For the function specifications, see your Windows documentation. A child process started from a user program cannot be killed.
(2) UNIX execution host
Forcibly terminating an active job kills the following processes on a UNIX execution agent host:
-
Process started directly from JP1/AJS3 (job)
-
Process started from a user program (excluding a process whose process group is modified by a setpgrp system call or other means)
To kill these processes, the UNIX OS sends a SIGKILL signal to the process group. For details about process groups and SIGKILL, see the documentation relating to UNIX process control.
(3) Killing a job created by JP1/Script
Job processes created by JP1/Script (process having the extension .spt) are killed from JP1/AJS3 using SPTHTerminate, a script control interface of JP1/Script. For details about SPTHTerminate, see the manual JP1/Script Description and Reference (For Windows Systems). This interface also terminates child processes started from the JP1/Script process (.spt).
Which child processes are killed depends on whether they were started from the JP1/Script process (.spt) or from a different process, as described in the following table:
Pattern |
Process call sequence |
Range of terminated processes when the JP1/AJS3 process (no. 1 in the call sequence) is killed |
---|---|---|
Pattern 1 |
|
All processes up to no. 3 |
Pattern 2 |
|
All processes up to no. 4 |
Pattern 3 |
|
All processes up to no. 3 (no. 4 is not terminated) |
If the JP1/Script process has not ended within 30 seconds of the forced termination request from JP1/AJS3, it is killed by calling the Win32API TerminateProcess function. As TerminateProcess does not kill child processes, only the JP1/Script process (no. 2 in the above patterns) is terminated.