diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-10-28 21:37:42 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-10-28 21:37:42 (GMT) |
commit | c975b9477b8181db2f9076be43f53ef32397319b (patch) | |
tree | 6710a51e8e31a8c5fb471c5229a4c3943831fad6 /Modules/_testcapimodule.c | |
parent | 7e3ec048f988b08392cc04c8cb7cf4d66da11580 (diff) | |
download | cpython-c975b9477b8181db2f9076be43f53ef32397319b.zip cpython-c975b9477b8181db2f9076be43f53ef32397319b.tar.gz cpython-c975b9477b8181db2f9076be43f53ef32397319b.tar.bz2 |
Backport 52503:
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).
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r-- | Modules/_testcapimodule.c | 3 |
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; } |