When using trap on SIGTERM the script will not react to the SIGTERM signal sent while a child is executing. I.e, the following script does not react on SIGTERM sent to it if it is waiting for sleep to finish: ``` trap "echo Handled SIGTERM" 0 2 3 15 echo "Before sleep" sleep inf echo "After sleep" ``` Instead, trap only on EXIT which covers also a scenario with exit on SIGINT, SIGTERM. Signed-off-by: Stepan Blyschak <stepanb@nvidia.com> |
||
---|---|---|
.. | ||
arp_update | ||
asic_status.py | ||
asic_status.sh | ||
bgp.sh | ||
configdb-load.sh | ||
core_cleanup.py | ||
gbsyncd-platform.sh | ||
gbsyncd.sh | ||
lldp.sh | ||
mark_dhcp_packet.py | ||
radv.sh | ||
sonic-netns-exec | ||
supervisor-proc-exit-listener | ||
swss.sh | ||
syncd_common.sh | ||
syncd.sh | ||
teamd.sh | ||
update_chassisdb_config | ||
write_standby.py |