See
http://www.opengroup.org/onlinepubs/007904975/functions/pthread_key_create.html
I do not think that we should support more than one iterations at the
moment. This seems to be a rather new addition to the pthread
specification.
2002-09-23 Thomas Pfaff <[EMAIL PROTECTED]>
* thread.cc (pthread_key::run_destructor): Run destructor only if
key value is not NULL.
diff -urp src.old/winsup/cygwin/thread.cc src/winsup/cygwin/thread.cc
--- src.old/winsup/cygwin/thread.cc Mon Sep 23 14:15:17 2002
+++ src/winsup/cygwin/thread.cc Mon Sep 23 14:22:22 2002
@@ -1031,7 +1031,11 @@ void
pthread_key::run_destructor () const
{
if (destructor)
- destructor (get ());
+ {
+ void *value = get ();
+ if (value)
+ destructor (value);
+ }
}
/*pshared mutexs: