[omniORB] Lockup on Solaris 2.5.1 with Y2K patch

Harald Hopfes harald.hopfes@vs.dasa.de
Tue, 22 Jun 1999 10:17:26 +0200


Hi!

You protect the variable "int died" only in the "killer" thread against mutual
access. In the worker
thread it isn't protected!

The code

  while (!died) {

should be rewritten to

  while (1) {
     pthread_mutex_lock(&mutex);
     if (died) {
          pthread_mutex_unlock(&mutex);
          break;
     }
     pthread_mutex_unlock(&mutex);

Harald