diff options
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; } |