From: Andrew MacIntyre Date: Sun, 23 Jul 2006 13:01:03 +0000 (+0000) Subject: bugfix: PyThread_start_new_thread() returns the thread ID, not a flag; X-Git-Tag: v2.4.4c1~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5596679a4a70393cedd4c93555dfc9b5e3b1d5a8;p=thirdparty%2FPython%2Fcpython.git bugfix: PyThread_start_new_thread() returns the thread ID, not a flag; backport of rev 50787. --- diff --git a/Python/thread_os2.h b/Python/thread_os2.h index a18ce6fd6c7a..c6fd23ee8931 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