qemu_shim: Ignore SIGPIPE
qemu_shim: Ignore SIGPIPE

I've found that if my virtlogd is socket activated but the daemon
doesn't run yet, then the virt-qemu-run is killed right after it
tries to start the domain. The problem is that because the default
setting is to use virtlogd, the domain create code tries to
connect to virtlogd socket, which in turn tries to detect who is
connecting (virNetSocketGetUNIXIdentity()) and as a part of it,
it will try to open /proc/${PID_OF_SHIM}/stat which is denied by
SELinux:

  type=AVC msg=audit(1582903501.927:323): avc:  denied  { search } for  \
  pid=1210 comm="virtlogd" name="1843" dev="proc" ino=37224 \
  scontext=system_u:system_r:virtlogd_t:s0-s0:c0.c1023 \
  tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=dir \
  permissive=0

Virtlogd reacts by closing the connection which the shim sees as
SIGPIPE. Since the default response to the signal is Term, we
don't even get to reporting any error nor to removing the
temporary directory.

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>
Reviewed-by: Andrea Bolognani <3ada0bee826c753786fdbba72243dfba997094cf@redhat.com>

nertpinx/libvirt,jfehlig/libvirt,nertpinx/libvirt,jardasgit/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,crobinso/libvirt,crobinso/libvirt,jfehlig/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,olafhering/libvirt,zippy2/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,zippy2/libvirt,olafhering/libvirt,libvirt/libvirt,libvirt/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,olafhering/libvirt,zippy2/libvirt,olafhering/libvirt,libvirt/libvirt,jfehlig/libvirt,nertpinx/libvirt,crobinso/libvirt,nertpinx/libvirt,jardasgit/libvirt,libvirt/libvirt,crobinso/libvirt,zippy2/libvirt