On 07/28/2011 09:23 PM, Simo Sorce wrote:
Attached patch that makes sure we alays close the socket on modeule
unloading.
It is defined in common.c so all clients that use that file get it, so
nss_sss.so has it as well.
Ticket #942
Simo.
I was getting warnings from autoreconf with the patch. I had to do 2
adjustments to get rid of them:
1) add a _cv_ into the cache variable name
2) wrap the source into a AC_LANG_SOURCE() macro.
Feel free to squash in the attached patch.
While the __destructor__ attribute is GCC-specific, I tested that LLVM
supports it as well.
One question, though - while this ensures that we always call the close
function when the module is unloaded, do we still have a bug in the code
where it's possible that a codepath that should call the close function
explicitly does not?