Index: trunk/mmap.c
===================================================================
--- trunk/mmap.c	(revision 79)
+++ trunk/mmap.c	(revision 83)
@@ -12,4 +12,5 @@
 #	define ftruncate chsize
 #	define getuid() 0
+#	include <process.h>
 #	define XCacheCreateFileMapping(size, perm, name) \
 		CreateFileMapping(INVALID_HANDLE_VALUE, NULL, perm, (sizeof(xc_shmsize_t) > 4) ? size >> 32 : 0, size & 0xffffffff, name)
@@ -158,7 +159,14 @@
 	if (path == NULL || !path[0]) {
 		static int inc = 0;
-		snprintf(tmpname, sizeof(tmpname) - 1, "%s.%d.%d.%d", TMP_PATH, (int) getuid(), inc ++, rand());
+		snprintf(tmpname, sizeof(tmpname) - 1, "%s.%d.%d.%d.%d", TMP_PATH, (int) getuid(), (int) getpid(), inc ++, rand());
 		path = tmpname;
 	}
+#ifdef ZEND_WIN32
+	else {
+		static int inc2 = 0;
+		snprintf(tmpname, sizeof(tmpname) - 1, "%s.%d.%d.%d.%d", path, (int) getuid(), (int) getpid(), inc2 ++, rand());
+		path = tmpname;
+	}
+#endif
 
 	shm->name = strdup(path);
