0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

fail faster on bad mmap data

This commit is contained in:
Eliot Horowitz 2009-12-23 15:55:07 -05:00
parent 34ce721624
commit 16b07128f3

View File

@ -53,6 +53,9 @@ namespace mongo {
// length may be updated by callee.
theFileAllocator().allocateAsap( filename, length );
len = length;
massert( "mmap() can't map area of size 0" , length > 0 );
fd = open(filename, O_RDWR | O_NOATIME);
if ( fd <= 0 ) {