diff Python/thread_os2.h @ 39150:3ac8509437df 2.4

bugfix: PyThread_start_new_thread() returns the thread ID, not a flag; backport of rev 50787.
author Andrew MacIntyre <andymac@bullseye.apana.org.au>
date Sun, 23 Jul 2006 13:01:03 +0000
parents e1a7eb832cb5
children 78643be3cf40
line wrap: on
line diff
--- a/Python/thread_os2.h	Sun Jul 16 01:21:47 2006 +0000
+++ b/Python/thread_os2.h	Sun Jul 23 13:01:03 2006 +0000
@@ -32,18 +32,15 @@
 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