[libvirt] [PATCH] Make sure that filedescriptors are only closed once

Daniel Veillard veillard at redhat.com
Fri Oct 15 07:01:01 UTC 2010


On Thu, Oct 14, 2010 at 09:20:01PM -0400, Stefan Berger wrote:
>  Setting fd=-1 in these places makes sure that the fd is not closed
> twice later on in 'clean:'. This is of course a recipe for disaster
> in a multi-threaded system where the filedescriptor can belong to
> something else right away.
> At least we have a pattern...
> 
> (looks like I can close the augeas bug as well...)

  Hum, no, augeas library should make sure it never exits, whatever
the conditions, that's still a bug IMHO.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list