99b3b1dbde0769545b99b0e804c64e303808c65f
galt
  Wed Jul 10 22:58:19 2013 -0700
make sure that the rlimit out of memory errAbort still works
diff --git src/lib/errabort.c src/lib/errabort.c
index cae6ccc..0238aa5 100644
--- src/lib/errabort.c
+++ src/lib/errabort.c
@@ -304,31 +304,31 @@
 // We need yet another mutex and a boolean to tell us when the pidInUse value may be safely compared to pid.
 
 // Use a boolean since there is no known unused value for pthread_t variable. NULL and -1 are not portable.
 static boolean pidInUseValid = FALSE;  // tells when pidInUse contains a valid pid that can be compared.
 static pthread_t pidInUse; // there is no "unused" value to which we can initialize this.
 static pthread_mutex_t pidInUseMutex = PTHREAD_MUTEX_INITIALIZER;
 pthread_mutex_lock( &pidInUseMutex );
 // If this pid equals pidInUse, then this function has been re-entered due to severe out-of-memory error.
 // But we only compare them when pidInUseValid is TRUE.
 if (pidInUseValid && pthread_equal(pid, pidInUse)) 
     {
     // Avoid deadlock on self by exiting immediately.
     // Use pthread_equal because directly comparing two pthread_t vars is not allowed.
     // This re-entrancy only happens when it has aborted already due to out of memory
     // which should be a rare occurrence.
-    char *errMsg = "errAbort re-entered due to out-of-memory condition. Exiting.";
+    char *errMsg = "errAbort re-entered due to out-of-memory condition. Exiting.\n";
     write(STDERR_FILENO, errMsg, strlen(errMsg)); 
     _exit(1);   // out of memory is a serious problem, exit immediately without running atexit cleanup.
     }
 pthread_mutex_unlock( &pidInUseMutex );
 
 // This is the main mutex we really care about.
 // It controls access to the hash where thread-specific data is stored.
 static pthread_mutex_t ptavMutex = PTHREAD_MUTEX_INITIALIZER;
 pthread_mutex_lock( &ptavMutex );
 
 // safely tell threads that pidInUse
 // is valid and correctly set and may be compared to pid
 pthread_mutex_lock( &pidInUseMutex );
 pidInUse = pthread_self();  // setting it directly to pid is not allowed.
 pidInUseValid = TRUE;