- The <kill_task ... immediately="yes"/> command exists but it sends a SIGKILL signal. A new command is required that sends a SIGTERM signal.
- Operation: kill immediately
- JOC sends <kill_task immediately="yes"/>
- The respective process is killed immediately with the signal SIGKILL.
- Operation: terminate with timeout
- JOC sends <kill_task immediately="yes" timeout="15"/>
- The respective process receives a SIGTERM signal. Should that process not terminate within the specified timeout then it will be killed with a signal SIGKILL.
- Operation: terminate
- JOC sends <kill_task immediately="yes" timeout="never"/>
- The respective process receives a SIGTERM signal. No monitoring of the termination of that process as in operation 2) is performed.
- This feature is intended for Unix platforms that implement the SIGTERM and SIGKILL signals. It is not intended for Windows platforms. For Windows systems exclusively the Kill Immediately command applies.
- When using traps then please consider that the process created by the <shell> element receives the signal. Subsequent scripts that are called within the <shell> element will not receive the signal. You could therefore
- configure traps directly within the <shell> element. The shell process will then receive and handle the signal.
- configure traps in a shell script that is added by an <include> element instead of being stated within the <shell> element. The included shell script will receive and handle the signal.
- forward signals to subsequent shell scripts that are called within a <shell> element.
The job job_trap_sigterm.job.xml shows howto trap the terminate command provided by JOC.
- Start the job
- Terminate the task in JOC
- You will see the log message sigterm will be ignored
- The task will continue