How to modify scripts behavior on signals using bash traps
Oct 25, 2017, 10:00 (0 Talkback[s])
(Other stories by Egidio Docile)
Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers
When writing scripts that are meant to run for a considerable time, it's very important to increase their robustness by making them able to react to system signals, executing specific actions when some of them are received. We can accomplish this task by using the bash trap builtin.