diff options
author | Anatol Belski <ab@php.net> | 2016-08-18 16:01:23 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-08-18 16:01:23 +0200 |
commit | 2f430a4b6cf1e12b9629d451ce5e203c58b9eb72 (patch) | |
tree | d0036f6891364f198f040a7ad635b5644ce42f8e /TSRM | |
parent | 5818b09a45a016f40ed910a0279c626ce54278fc (diff) | |
parent | 98d8794eae787571e061b3f07bbd196fa373fa48 (diff) | |
download | php-git-2f430a4b6cf1e12b9629d451ce5e203c58b9eb72.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
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 fc5e58f2f4..4651cbf079 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -721,10 +721,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(); @@ -733,6 +729,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; } |