Browse Source

avoid other efforts if memory mapping fails

pull/2091/head
Anatol Belski 10 years ago
parent
commit
98d8794eae
  1. 8
      TSRM/tsrm_win32.c

8
TSRM/tsrm_win32.c

@ -671,10 +671,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();
@ -686,6 +682,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;
}

Loading…
Cancel
Save