Revise treatment of SIGTERM in Linux
While using a pytango server, I realised that sending SIGTERM to it didn't produce an automatic exit. The code installed a signal handler for SIGTERM before the device server was created and started. The handler installation was clearly causing the issue: when it wasn't installed then the server quit as expected.
From my reading of the cppTango documentation and the code, I came to an understanding of what's going on. Full details of my reasoning are in ska-telescope/sdp/ska-sdp-lmc@2c102707. tl;dr: SIGTERM handlers are not cleared on the main thread, which is possibly causing the signal handling thread not to receive it.
I believe this situation should either not happened. My impression is that SIGTERM handlers should be removed, with a warning message, otherwise dispatch of SIGTERM signals to classes and devices will not occur, nor will the automatic shutdown of device servers.