|
From: Nigel H. <nj...@ba...> - 2006-08-13 19:24:09
|
Paul Pluzhnikov wrote: > Nigel Horne wrote: > >> No it won't do, since it doesn't tell you where the errant close is, >> all you get is: >> >> close(15) = -1 EBADF (Bad file descriptor) > > Once you know there is a "bad close", it is trivial to find where > it comes from (just use 'gdb'). > > VG gives you huge advantage for bugs that are *hard* to find. > The one in your example isn't (just MHO). Of course, that's what an example is for - to explain the point not to show buggy code. > Cheers, |