summaryrefslogtreecommitdiff
path: root/TSRM/tsrm_win32.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-08-18 16:02:22 +0200
committerAnatol Belski <ab@php.net>2016-08-18 16:02:22 +0200
commitde570f501771200f210ddbafe9677896136c50a5 (patch)
treee79695c222f23e58d4c3adb589345d4e71a23018 /TSRM/tsrm_win32.c
parent3bb3ca339e302921ec6e541bdd0588e1b158360c (diff)
parent2f430a4b6cf1e12b9629d451ce5e203c58b9eb72 (diff)
downloadphp-git-de570f501771200f210ddbafe9677896136c50a5.tar.gz
Merge branch 'PHP-7.1'
* PHP-7.1: avoid other efforts if memory mapping fails
Diffstat (limited to 'TSRM/tsrm_win32.c')
-rw-r--r--TSRM/tsrm_win32.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index 6bf826e6fa..e3d311e418 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -722,10 +722,6 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
return (void*)-1;
}
- shm->descriptor->shm_atime = time(NULL);
- shm->descriptor->shm_lpid = getpid();
- shm->descriptor->shm_nattch++;
-
shm->addr = MapViewOfFileEx(shm->segment, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
err = GetLastError();
@@ -734,6 +730,10 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
return (void*)-1;
}
+ shm->descriptor->shm_atime = time(NULL);
+ shm->descriptor->shm_lpid = getpid();
+ shm->descriptor->shm_nattch++;
+
return shm->addr;
}