]> xenbits.xensource.com Git - libvirt.git/commit
util: Fix deadlock in virLogReset
authorJiri Denemark <jdenemar@redhat.com>
Thu, 7 Jun 2012 13:16:50 +0000 (15:16 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 8 Jun 2012 08:09:54 +0000 (10:09 +0200)
commitd581313acf863b5f8c39ee9940ada83d680570b2
treef4aee3905339bd36a59b7374afd8eedab682434c
parent9ec6f818deae2205ebb9790d852ebd673ba667fc
util: Fix deadlock in virLogReset

When libvirtd forks off a new child, the child then calls virLogReset(),
which ends up closing file descriptors used as log outputs. However, we
recently started logging closed file descriptors, which means we need to
lock logging mutex which was already locked by virLogReset(). We don't
really want to log anything when we are in the process of closing log
outputs.
src/util/logging.c
src/util/virfile.c
src/util/virfile.h