[PATCH] run: gracefully handle SIGHUP, SIGQUIT, SIGTERM

Ján Tomko jtomko at redhat.com
Thu Mar 10 07:17:37 UTC 2022

On a Wednesday in 2022, Daniel P. Berrangé wrote:
>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.
>Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> run.in | 10 ++++++++++
> 1 file changed, 10 insertions(+)

Reviewed-by: Ján Tomko <jtomko at redhat.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220310/a2b0fb8c/attachment.sig>

More information about the libvir-list mailing list