Index: mmap.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/mmap.cc,v retrieving revision 1.68 diff -u -p -r1.68 mmap.cc --- mmap.cc 15 Jan 2003 10:21:23 -0000 1.68 +++ mmap.cc 15 Jan 2003 18:51:30 -0000 @@ -986,9 +986,11 @@ fixup_mmaps_after_fork (HANDLE parent) getpagesize (), NULL)) { DWORD old_prot; + DWORD last_error = GetLastError (); - if (GetLastError () != ERROR_PARTIAL_COPY || - !wincap.virtual_protect_works_on_shared_pages ()) + if (last_error != ERROR_PARTIAL_COPY + && last_error != ERROR_NOACCESS + || !wincap.virtual_protect_works_on_shared_pages ()) { system_printf ("ReadProcessMemory failed for " "MAP_PRIVATE address %p, %E",