[#1019] [YottaDB/Lang/YDBPython#32] SIGTERM of Simple API application should do db/ipcs rundown by default
Background
-
For more background see YottaDB/DBMS/YDBOcto!1451 (comment 1519229835) and surrounding discussion. Below is a summary of that.
-
YottaDB/DBMS/YDBOcto@df7f4fd4 fixed Octo to set the disposition for the SIGTERM signal to
SIG_IGN
as the default action ofSIG_DFL
will cause YottaDB to immediately terminate the Simple API Octo application on receipt of a SIGTERM (due to ae2721d8) and this would leave the databases not rundown and ipcs not cleaned up. -
During that fix, @shabiel wondered if we should move the burden of setting the disposition to
SIG_IGN
from each Simple API application to YottaDB instead. -
That sounded like a good idea and seemed safe to implement so I went ahead with it.
Fix
- In
sig_init.c
, we check if it is a Simple API application and if so we check if the disposition of SIGTERM/SIGQUIT/SIGINT isSIG_DFL
. If so, we reset it to beSIG_IGN
instead.