libvirt/src/util
Cole Robinson cd0ef0e09b Fix log locking problem when using fork() in the library
Ad pointed out by Dan Berrange:
So if some thread in libvirtd is currently executing a logging call,
while another thread calls virExec(), that other thread no longer
exists in the child, but its lock is never released. So when the
child then does virLogReset() it deadlocks.

The only way I see to address this, is for the parent process to call
virLogLock(), immediately before fork(), and then virLogUnlock()
afterwards in both parent & child. This will ensure that no other
thread
can be holding the lock across fork().

* src/util/logging.[ch] src/libvirt_private.syms: export virLogLock() and
  virLogUnlock()
* src/util/util.c: lock just before forking and unlock just after - in
  both parent and child.
2010-02-03 17:12:57 +01:00
..
bridge.c Introduce virStrncpy. 2009-09-22 20:10:00 +02:00
bridge.h Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00
buf.c Add virBufferFreeAndReset() and replace free() 2009-12-10 00:00:50 +01:00
buf.h Add virBufferFreeAndReset() and replace free() 2009-12-10 00:00:50 +01:00
cgroup.c Fix check for existance of cgroups at creation 2009-11-13 11:50:12 +00:00
cgroup.h LXC implement memory control APIs 2009-10-07 15:26:23 +02:00
conf.c xm_internal.c: remove misleading dead code 2009-12-15 17:46:04 +01:00
conf.h Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00
ebtables.c Removes the ebtablesSaveRules() function 2009-11-09 15:30:15 +01:00
ebtables.h New ebtables module wrapper 2009-11-03 23:44:48 +01:00
event.c Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00
event.h Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00
hash.c Fix up a comment in virHashUpdateEntry 2010-02-01 09:39:54 -05:00
hash.h Remove bogus const annotations to hash iterator 2009-10-19 16:24:12 +01:00
hostusb.c hostusb: closedir only if non-NULL; rename labels: s/error/cleanup/ 2010-01-26 16:11:45 +01:00
hostusb.h Implement path lookup for USB by vendor:product 2010-01-13 15:24:41 -05:00
iptables.c remove iptablesReloadRules() and related code 2009-12-10 11:27:18 +00:00
iptables.h remove iptablesReloadRules() and related code 2009-12-10 11:27:18 +00:00
json.c json.c: avoid an unconditional leak from most qemuMonitorJSON* functions 2010-02-01 19:48:34 +01:00
json.h Misc fixes to QMP monitor support for QEMU 2010-01-25 17:08:37 +00:00
logging.c Fix log locking problem when using fork() in the library 2010-02-03 17:12:57 +01:00
logging.h Fix log locking problem when using fork() in the library 2010-02-03 17:12:57 +01:00
memory.c Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00
memory.h Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00
network.c Avoid an type-punned pointer aliasing pbm 2009-12-08 15:01:57 +01:00
network.h Remove undefined symbols from libvirt_private.syms 2009-12-23 14:57:07 +01:00
pci.c pci.c: correct an erroneous expression 2010-01-27 08:10:06 +01:00
pci.h qemu: Fix race between device rebind and kvm cleanup 2010-01-22 12:03:49 -05:00
processinfo.c Fix argument type of virProcessInfoSetAffinity dummy function 2009-12-22 13:04:50 +01:00
processinfo.h Pull schedular affinity code out into a separate module 2009-11-23 11:58:13 +00:00
qparams.c Add virBufferFreeAndReset() and replace free() 2009-12-10 00:00:50 +01:00
qparams.h Add sentinel attribute for NULL terminated arg lists 2009-11-06 10:39:13 +01:00
stats_linux.c Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00
stats_linux.h Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00
storage_file.c Add virStorageFileGetMetadata() helper 2009-09-30 10:37:00 +01:00
storage_file.h Add virStorageFileGetMetadata() helper 2009-09-30 10:37:00 +01:00
threads-pthread.c Add a new timed condition variable wait API 2009-11-10 11:59:17 +00:00
threads-pthread.h Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00
threads-win32.c Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00
threads-win32.h Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00
threads.c Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00
threads.h Add a new timed condition variable wait API 2009-11-10 11:59:17 +00:00
util.c Fix log locking problem when using fork() in the library 2010-02-03 17:12:57 +01:00
util.h New utility functions virFileCreate and virDirCreate 2010-01-21 00:33:43 +01:00
uuid.c Allow surrounding whitespace in uuid 2010-01-21 15:32:37 +01:00
uuid.h Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00
virterror_internal.h virterror: Add virSetError 2010-01-12 10:48:33 -05:00
virterror.c Add missing function parameter documentation 2010-01-26 21:23:18 +01:00
xml.c Consolidate virXPathNodeSet() 2009-10-22 10:33:52 +02:00
xml.h Move all shared utility files to src/util/ 2009-09-21 14:41:47 +01:00