Revert "Use os file locking to lock dbpath"

This reverts commit 56e81849a0.
This commit is contained in:
Aaron
2009-03-10 10:14:37 -04:00
parent 56e81849a0
commit 3931f7efcb
5 changed files with 5 additions and 32 deletions

View File

@@ -30,8 +30,6 @@
#include "reccache.h"
namespace mongo {
const char *dbpath = "/data/db/";
int nloggedsome = 0;
#define LOGSOME if( ++nloggedsome < 1000 || nloggedsome % 100 == 0 )
@@ -630,17 +628,8 @@ namespace mongo {
// should we be locked here? we aren't. might be ok as-is.
recCacheCloseAll();
// remove lock file
if ( lockFile > 0 ) {
string lockFile = lockFileName();
boost::filesystem::remove( lockFile.c_str() );
}
rawOut( "dbexit: really exiting now\n" );
::exit(rc);
}
string lockFileName() { return ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string(); }
int lockFile = -1;
} // namespace mongo