run: gracefully handle SIGHUP, SIGQUIT, SIGTERM
run: gracefully handle SIGHUP, SIGQUIT, SIGTERM

When using thue 'run' script to launch a daemon, it is intended to
temporarily stop the systemd units and re-start them again after.

When using this script over an SSH connection, it will get SIGHUP
if the connection goes away, and in this case it fails to re-start
the systemd units. We need to catch SIGHUP and turn it into a
normal python exception. For good measure we do the same for
SIGQUIT and SIGTERM too.  SIGINT already gets turned into an
exception by default which we handle.

Reviewed-by: Ján Tomko <4cab11cfb98d3c937327354a78eb07dbb6ee2bc6@redhat.com>
Signed-off-by: Daniel P. Berrangé <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>

zippy2/libvirt,jfehlig/libvirt,libvirt/libvirt,zippy2/libvirt,zippy2/libvirt,jfehlig/libvirt,olafhering/libvirt,libvirt/libvirt,olafhering/libvirt,libvirt/libvirt,crobinso/libvirt,olafhering/libvirt,zippy2/libvirt,olafhering/libvirt,libvirt/libvirt,jfehlig/libvirt,crobinso/libvirt,jfehlig/libvirt,crobinso/libvirt,crobinso/libvirt