tony2001 Tue Mar 20 17:57:59 2007 UTC
Modified files: (Branch: PHP_5_2)
/TSRM tsrm_win32.c
Log:
MFH: fix shmop_open() with IPC_CREAT|IPC_EXCL flags on win32
http://cvs.php.net/viewvc.cgi/TSRM/tsrm_win32.c?r1=1.27.2.1.2.4&r2=1.27.2.1.2.5&diff_format=u
Index: TSRM/tsrm_win32.c
diff -u TSRM/tsrm_win32.c:1.27.2.1.2.4 TSRM/tsrm_win32.c:1.27.2.1.2.5
--- TSRM/tsrm_win32.c:1.27.2.1.2.4 Sat Feb 24 02:50:58 2007
+++ TSRM/tsrm_win32.c Tue Mar 20 17:57:59 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_win32.c,v 1.27.2.1.2.4 2007/02/24 02:50:58 stas Exp $ */
+/* $Id: tsrm_win32.c,v 1.27.2.1.2.5 2007/03/20 17:57:59 tony2001 Exp $ */
#include <stdio.h>
#include <fcntl.h>
@@ -280,9 +280,6 @@
info_handle = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, shm_info);
if ((!shm_handle && !info_handle)) {
- if (flags & IPC_EXCL) {
- return -1;
- }
if (flags & IPC_CREAT) {
shm_handle =
CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, size,
shm_segment);
info_handle =
CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0,
sizeof(shm->descriptor), shm_info);
@@ -291,6 +288,10 @@
if ((!shm_handle || !info_handle)) {
return -1;
}
+ } else {
+ if (flags & IPC_EXCL) {
+ return -1;
+ }
}
shm = shm_get(key, NULL);
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|