Details
-
Bug
-
Resolution: Done
-
Minor - P4
-
None
-
Windows
-
Fully Compatible
-
Windows
Description
From code inspection:
src/mongo/db/instance.cpp lines 1008 to 1010:
#ifdef _WIN32
|
if( _chsize( lockFile , 0 ) )
|
log() << "couldn't remove fs lock " << WSAGetLastError() << endl;
|
WSAGetLastError() does not return anything useful here – this is for WinSock errors. Here, it will always print "0".
Better code would be:
#ifdef _WIN32
|
if( _chsize( lockFile , 0 ) )
|
log() << "couldn't remove fs lock " << errnoWithDescription(_doserrno) << endl;
|
which will print the errno value and the system text, for example:
couldn't remove fs lock errno:6 The handle is invalid.
|