Block SIGHUP when running dhclient
Block SIGHUP when running dhclient

The dhclient process we create is associated with the controlling
terminal of the "init" process. When we systemd in a container
one of the first things it does is disassociate itself from any
controlling terminal. This causes other apps associated with
that session to receive SIGHUP. This unfortunately kills off
the dhclient process we spawned. We can't set the signal handler
to SIG_IGN since glib2's spawn method will reset that. Instead
we just block the SIGHUP signal entirely using a signal mask.

Signed-off-by: Daniel P. Berrange <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>

erenyagdiran/libvirt-sandbox,gczarcinski/libvirt-sandbox,gczarcinski/libvirt-sandbox,libvirt/libvirt-sandbox,gczarcinski/libvirt-sandbox,agx/libvirt-sandbox-debian,libvirt/libvirt-sandbox,gczarcinski/libvirt-sandbox,gczarcinski/libvirt-sandbox,libvirt/libvirt-sandbox,agx/libvirt-sandbox-debian,gczarcinski/libvirt-sandbox,agx/libvirt-sandbox-debian,agx/libvirt-sandbox-debian,agx/libvirt-sandbox-debian,erenyagdiran/libvirt-sandbox,erenyagdiran/libvirt-sandbox,erenyagdiran/libvirt-sandbox