]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Avoid taking lock in libvirt debug dump
authorDaniel Veillard <veillard@redhat.com>
Tue, 15 Mar 2011 08:10:03 +0000 (16:10 +0800)
committerDaniel Veillard <veillard@redhat.com>
Fri, 18 Mar 2011 02:06:30 +0000 (10:06 +0800)
commit10598dd568bb9df1d6e8b2f19917a72f334ad80b
treedb1bcda27a144ea6c992b089a01db6e9ca5d6213
parent9741f3461b14e84816a21e1a9578adb7f1466fa2
Avoid taking lock in libvirt debug dump

As pointed out, locking the buffer from the signal handler
cannot been guaranteed to be safe, so to avoid any hazard
we prefer the trade off of dumping logs possibly messed up
by concurrent logging activity rather than risk a daemon
crash.

* src/util/logging.c: change virLogEmergencyDumpAll() to not
  take any lock on the log buffer but reset buffer content variables
  to an empty set before starting the actual dump.
src/util/logging.c