summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-10-15 16:19:25 -0400
committerEliot Horowitz <eliot@10gen.com>2009-10-15 16:19:25 -0400
commit98d994eb51b174c4f464194ccb2b406ed9e37230 (patch)
tree02f5e0299e4dd8763c7f47b64edd82f1532928bf
parent0abfa82d540ae6e7fc25b58d30af37340b2f7ba8 (diff)
downloadmongo-98d994eb51b174c4f464194ccb2b406ed9e37230.tar.gz
get rid of warning in linux process info thing
-rw-r--r--util/processinfo_linux2.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/util/processinfo_linux2.cpp b/util/processinfo_linux2.cpp
index 3a6bd900daf..035acc6a2f7 100644
--- a/util/processinfo_linux2.cpp
+++ b/util/processinfo_linux2.cpp
@@ -19,8 +19,8 @@ namespace mongo {
sprintf( name , "/proc/%d/stat" , pid );
FILE * f = fopen( name , "r");
-
- fscanf(f,
+
+ int found = fscanf(f,
"%d %s %c "
"%d %d %d %d %d "
"%lu %lu %lu %lu %lu "
@@ -61,7 +61,9 @@ namespace mongo {
&_rtprio, &_sched
*/
);
-
+ if ( found == 0 ){
+ cerr << "system error: reading proc info" << endl;
+ }
fclose( f );
}