2.6.21 Performing user-specific postprocessing when a job is terminated forcibly
The job controller allows you to perform user-specific post-processing when a forced termination is requested by JP1/AJS, by the SIGTERM signal in UNIX, or by the taskkill command in Windows (immediate termination of process by such means as TerminateProcess). This feature enables the user to enhance operational flexibility by performing user-specific termination processing when a forced termination request is received. You must define the TRAP_ACTION_SIGTERM environment setting parameter in order to perform user-specific postprocessing when a forced termination request is received.
Note that the operand supported by the TRAP_ACTION_SIGTERM environment setting parameter is different between the UNIX edition and the Windows edition. For details about the TRAP_ACTION_SIGTERM environment setting parameter, see TRAP_ACTION_SIGTERM parameter (defines the job controller's action when a forced termination request is received) in 7. Parameters Specified in the Environment Files.
The following shows an example:
- Contents of the environment variable
#-adsh_conf TRAP_ACTION_SIGTERM TERM
- Contents of the job definition script
#-adsh_job JOB01 trap "UAP_TERM" TERM UAP01
If a forced termination request is received while UAP01 is running, the job controller executes UAP_TERM, performs postprocessing (such as deleting allocated files and forcibly terminating descendant processes), and then terminates the job.