pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1748:       DEBUG_CHECK_THREAD();       THREADS_FPRINTF(0, (stderr,"new_thread_func(): Thread %p inited\n",    arg.thread_state));       if(SETJMP(back))    {    if(throw_severity <= THROW_ERROR)    call_handle_error(); -  if(throw_severity == THROW_EXIT) +  else if(throw_severity == THROW_EXIT)    {    /* This is too early to get a clean exit if DO_PIKE_CLEANUP is    * active. Otoh it cannot be done later since it requires the    * evaluator stacks in the gc calls. It's difficult to solve    * without handing over the cleanup duty to the main thread. */    pike_do_exit(throw_value.u.integer); -  +  } else if (thread_state->thread_obj) { +  /* Copy the thrown exit value to the thread_state here, +  * if the thread hasn't been destructed. */ +  assign_svalue(&thread_state->result, &throw_value);    }    } else {    INT32 args=arg.args->size;    back.severity=THROW_EXIT;    push_array_items(arg.args);    arg.args=0;    f_call_function(args);       /* Copy return value to the thread_state here, if the thread    * object hasn't been destructed. */