Ver Mensaje Individual
  #10 (permalink)  
Antiguo 14/07/2013, 14:36
amchacon
 
Fecha de Ingreso: julio-2012
Mensajes: 375
Antigüedad: 11 años, 9 meses
Puntos: 28
Respuesta: Pthread tipo c -> c++

Sustituye return 0; por pthread_exit:
http://pubs.opengroup.org/onlinepubs...read_exit.html

A su vez, comprueba los errores de detach:

Código C:
Ver original
  1. int Buffer = pthread_detach(tid);
  2.  
  3. if (Buffer == EINVAL) // Imprimir "Not joinable thread"
  4. if (Buffer == ESRCH) // ID no válida
http://pubs.opengroup.org/onlinepubs...ad_detach.html