0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +01:00

assert if can't open /proc

This commit is contained in:
Eliot Horowitz 2010-05-14 10:37:11 -04:00
parent 2dbdcf9e4c
commit 32ebb1048a

View File

@ -38,7 +38,12 @@ namespace mongo {
sprintf( name , "/proc/%d/stat" , pid );
FILE * f = fopen( name , "r");
if ( ! f ){
stringstream ss;
ss << "couldn't open [" << name << "] " << errnoWithDescription();
string s = ss.str();
msgassertedNoTrace( 13276 , s.c_str() );
}
int found = fscanf(f,
"%d %s %c "
"%d %d %d %d %d "