diff options
| author | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2006-07-23 13:00:04 +0000 | 
|---|---|---|
| committer | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2006-07-23 13:00:04 +0000 | 
| commit | 82247cb7d1a5363dbe40ba14207916f0f939e6f6 (patch) | |
| tree | 1321260e7978dc4f753f10198e192f4728a52266 /Python/thread_os2.h | |
| parent | bb4503716f27ca2cf20937f08ee4f9272a0bd071 (diff) | |
| download | cpython-git-82247cb7d1a5363dbe40ba14207916f0f939e6f6.tar.gz | |
bugfix: PyThread_start_new_thread() returns the thread ID, not a flag;
will backport.
Diffstat (limited to 'Python/thread_os2.h')
| -rw-r--r-- | Python/thread_os2.h | 11 | 
1 files changed, 4 insertions, 7 deletions
diff --git a/Python/thread_os2.h b/Python/thread_os2.h index 3ed9d08a31..12eeed51c4 100644 --- a/Python/thread_os2.h +++ b/Python/thread_os2.h @@ -35,21 +35,18 @@ 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, +	thread_id = _beginthread(func,  				NULL,  				OS2_STACKSIZE(_pythread_stacksize),  				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  | 
