Example 2 – SIGTERM Handling - Basic Teradata Query

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-06-28
dita:mapPath
wmy1488824663431.ditamap
dita:ditavalPath
Audience_PDF_include.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 following command:

kill -9 PID