d90a25cdc313ad3752c2ab1a4de417ccb6622032
markd
  Fri May 22 20:23:15 2015 -0700
fixed race condition on hgsql purging temporary files that caused errors when mulitple hgsql commands were run at the same thing.  This is why /tmp was invented (no redmine)

diff --git src/lib/osunix.c src/lib/osunix.c
index 2a9a85a..56cfe01 100644
--- src/lib/osunix.c
+++ src/lib/osunix.c
@@ -225,31 +225,31 @@
     {
     char *fileName = de->d_name;
     if (differentString(fileName, ".") && differentString(fileName, ".."))
 	{
 	if (pattern == NULL || wildMatch(pattern, fileName))
 	    {
 	    struct stat st;
 	    bool isDir = FALSE;
 	    int statErrno = 0;
 	    strcpy(pathName+fileNameOffset, fileName);
 	    if (stat(pathName, &st) < 0)
 		{
 		if (ignoreStatFailures)
 		    statErrno = errno;
 		else
-    		    errAbort("stat failed in listDirX");
+    		    errnoAbort("stat failed in listDirX: %s", pathName);
 		}
 	    if (S_ISDIR(st.st_mode))
 		isDir = TRUE;
 	    if (fullPath)
 		fileName = pathName;
 	    el = newFileInfo(fileName, st.st_size, isDir, statErrno, st.st_atime);
 	    slAddHead(&list, el);
 	    }
 	}
     }
 closedir(d);
 slSort(&list, cmpFileInfo);
 return list;
 }