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:
parent
2dbdcf9e4c
commit
32ebb1048a
@ -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 "
|
||||
|
Loading…
Reference in New Issue
Block a user