~kirkland/+junk/eucalyptus

« back to all changes in this revision

Viewing changes to node/handlers_kvm.c

  • Committer: Dustin Kirkland
  • Date: 2010-04-22 18:30:09 UTC
  • Revision ID: kirkland@x200-20100422183009-klv2nfwg7eyrwtxi
Cherry-pick upstream commit r1223:
* node/handlers.c, node/handlers_kvm.c: handle situation where NC's
do not detach pthreads, LP: #567371

Show diffs side-by-side

added added

removed removed

Lines of Context:
199
199
    pthread_attr_init(attr);
200
200
    pthread_attr_setdetachstate(attr, PTHREAD_CREATE_DETACHED);
201
201
 
202
 
    if ( pthread_create (&(instance->tcb), NULL, startup_thread, (void *)instance) ) {
 
202
    if ( pthread_create (&(instance->tcb), attr, startup_thread, (void *)instance) ) {
203
203
        pthread_attr_destroy(attr);
204
204
        logprintfl (EUCAFATAL, "failed to spawn a VM startup thread\n");
205
205
        sem_p (inst_sem);
290
290
        logprintfl (EUCAFATAL, "failed to spawn a reboot thread\n");
291
291
        return ERROR_FATAL;
292
292
    }
 
293
    if ( pthread_detach(tcb) ) {
 
294
      logprintfl(EUCAFATAL, "failed to detach the reboot thread\n");
 
295
      return ERROR_FATAL;
 
296
    }
293
297
    
294
298
    return OK;
295
299
}