]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Introduce VIR_CLOSE to be used rather than close()
authorStefan Berger <stefanb@us.ibm.com>
Tue, 19 Oct 2010 14:23:51 +0000 (10:23 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Tue, 19 Oct 2010 14:23:51 +0000 (10:23 -0400)
commitf04de501bca81d894441905fc53b5efbb3485134
treeed3815abc592a67aa63b7ccd98d5ad578caf0705
parentb2c9a879408aec382611b1d2a817b83b9a8b344a
Introduce VIR_CLOSE to be used rather than close()

Since bugs due to double-closed file descriptors are difficult to track down in a multi-threaded system, I am introducing the VIR_CLOSE(fd) macro to help avoid mistakes here.

There are lots of places where close() is being used. In this patch I am only cleaning up usage of close() in src/conf where the problems were.

I also dare to declare close() as being deprecated in libvirt code base (HACKING).
HACKING
docs/hacking.html.in
src/Makefile.am
src/conf/domain_conf.c
src/conf/network_conf.c
src/conf/nwfilter_conf.c
src/conf/storage_conf.c
src/conf/storage_encryption_conf.c
src/libvirt_private.syms
src/util/files.c [new file with mode: 0644]
src/util/files.h [new file with mode: 0644]