summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-10-28 21:17:51 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-10-28 21:17:51 (GMT)
commit97a57220e8cfd857c7f46ec9d71f9f841c241fa8 (patch)
tree0f82e21ace943654438e7904ab4833cdecadce84 /Modules
parenta5ccda95f26abae0eb854d9619d4f80ec1cd6606 (diff)
downloadcpython-97a57220e8cfd857c7f46ec9d71f9f841c241fa8.zip
cpython-97a57220e8cfd857c7f46ec9d71f9f841c241fa8.tar.gz
cpython-97a57220e8cfd857c7f46ec9d71f9f841c241fa8.tar.bz2
Fix crash in test on HP-UX. Apparently, it's not possible to delete a lock if
it's held (even by the current thread). Will backport.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_testcapimodule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index edfe8ad..b11f0ae 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -667,6 +667,9 @@ test_thread_state(PyObject *self, PyObject *args)
PyThread_acquire_lock(thread_done, 1); /* wait for thread to finish */
Py_END_ALLOW_THREADS
+ /* Release lock we acquired above. This is required on HP-UX. */
+ PyThread_release_lock(thread_done);
+
PyThread_free_lock(thread_done);
Py_RETURN_NONE;
}