mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Patch #716969: Detect thread creation failure. Will backport to 2.2.
This commit is contained in:
parent
1e91d8eb03
commit
910ae6283a
2 changed files with 9 additions and 9 deletions
|
|
@ -40,8 +40,6 @@ PyThread_start_new_thread(void (*func)(void *), void *arg)
|
|||
{
|
||||
thread_t tid;
|
||||
struct func_arg *funcarg;
|
||||
int success = 0; /* init not needed when SOLARIS_THREADS and */
|
||||
/* C_THREADS implemented properly */
|
||||
|
||||
dprintf(("PyThread_start_new_thread called\n"));
|
||||
if (!initialized)
|
||||
|
|
@ -53,7 +51,7 @@ PyThread_start_new_thread(void (*func)(void *), void *arg)
|
|||
THR_DETACHED | THR_NEW_LWP, &tid)) {
|
||||
perror("thr_create");
|
||||
free((void *) funcarg);
|
||||
success = -1;
|
||||
return -1;
|
||||
}
|
||||
return tid;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue