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

2010-10-15 Thread Daniel Veillard
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.

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

2010-10-14 Thread Stefan Berger
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