Example 2: SIGTERM Handling | Basic Teradata Query - 17.00 - Example 2 – SIGTERM Handling - Basic Teradata Query

Basic Teradata® Query Reference

prodname
Basic Teradata Query
vrm_release
17.00
created_date
June 2020
category
Programming Reference
featnum
B035-2414-220K

SIGTERM issued when BTEQ is waiting on CLI for some SQL response:

BTEQ -- Enter your SQL request or BTEQ command:
SELECT * FROM dbc.tables a, dbc.tables b, dbc.tables c;

SELECT * FROM dbc.tables a, dbc.tables b, dbc.tables c;
<<< SIGTERM trapped here >>>
*** Exiting BTEQ Because Of Terminate Signal...
*** RC (return code) = 16
A SIGTERM signal is different than SIGKILL signal. While BTEQ traps the SIGTERM signal and exits with a non-0 severity, a SIGKILL signal cannot be trapped and BTEQ process will terminate abruptly. BTEQ’s return code upon SIGKILL will be system defined which is usually 265 for any process that is killed using SIGKILL.

A SIGKILL signal can be issued by running the following command:

kill -9 PID