summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>2006-07-23 13:01:03 +0000
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>2006-07-23 13:01:03 +0000
commit5596679a4a70393cedd4c93555dfc9b5e3b1d5a8 (patch)
tree93cf5704c0b0abac2162cdd70508e561a9556a82 /Python
parenta84938054d58bf019fde5b5291415fd57c70a3a6 (diff)
downloadcpython-git-5596679a4a70393cedd4c93555dfc9b5e3b1d5a8.tar.gz
bugfix: PyThread_start_new_thread() returns the thread ID, not a flag;
backport of rev 50787.
Diffstat (limited to 'Python')
-rw-r--r--Python/thread_os2.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/Python/thread_os2.h b/Python/thread_os2.h
index a18ce6fd6c..c6fd23ee89 100644
--- a/Python/thread_os2.h
+++ b/Python/thread_os2.h
@@ -32,18 +32,15 @@ PyThread__init_thread(void)
long
PyThread_start_new_thread(void (*func)(void *), void *arg)
{
- int aThread;
- int success = 0;
+ int thread_id;
aThread = _beginthread(func, NULL, THREAD_STACK_SIZE, arg);
- if (aThread == -1) {
- success = -1;
- fprintf(stderr, "aThread failed == %d", aThread);
+ if (thread_id == -1) {
dprintf(("_beginthread failed. return %ld\n", errno));
}
- return success;
+ return thread_id;
}
long