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

Basic Teradata® Query Reference

Product
Basic Teradata Query
Release Number
17.00
Published
December 2020
Language
English (United States)
Last Update
2020-12-12
dita:mapPath
zqt1544831938740.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

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