summaryrefslogtreecommitdiff
path: root/ace/Mem_Map.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-01-03 23:44:10 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-01-03 23:44:10 +0000
commit327a72ec6726aebf19f1b66d4e6ff90e5db48b83 (patch)
tree81b0133fa13fecf9fb88d6c12216bd7603917d80 /ace/Mem_Map.cpp
parent5760efabc89a9d6ccbf3f956603906eb195418c8 (diff)
downloadATCD-327a72ec6726aebf19f1b66d4e6ff90e5db48b83.tar.gz
.
Diffstat (limited to 'ace/Mem_Map.cpp')
-rw-r--r--ace/Mem_Map.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ace/Mem_Map.cpp b/ace/Mem_Map.cpp
index e79a5cabf7e..aa0d54cb188 100644
--- a/ace/Mem_Map.cpp
+++ b/ace/Mem_Map.cpp
@@ -206,6 +206,11 @@ ACE_Mem_Map::map (LPCTSTR file_name,
mode,
sa) == -1)
return -1;
+ else if (ACE_BIT_ENABLED (flags, O_CREAT)
+ && len <= 0)
+ // <mmap> will fail if the length of the file mapping is 0, which
+ // will be the case if we've just created the file.
+ return 0;
else
return this->map_it (this->handle (),
len,