diff options
author | Anatol Belski <ab@php.net> | 2016-08-18 16:02:22 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-08-18 16:02:22 +0200 |
commit | de570f501771200f210ddbafe9677896136c50a5 (patch) | |
tree | e79695c222f23e58d4c3adb589345d4e71a23018 /TSRM | |
parent | 3bb3ca339e302921ec6e541bdd0588e1b158360c (diff) | |
parent | 2f430a4b6cf1e12b9629d451ce5e203c58b9eb72 (diff) | |
download | php-git-de570f501771200f210ddbafe9677896136c50a5.tar.gz |
Merge branch 'PHP-7.1'
* PHP-7.1:
avoid other efforts if memory mapping fails
Diffstat (limited to 'TSRM')
-rw-r--r-- | TSRM/tsrm_win32.c | 8 |
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; } |