check return value from system call

This commit is contained in:
Mark Borgerding 2012-07-18 00:10:47 -04:00
parent 8a01c6085d
commit 8924f4e4ad

View File

@ -36,7 +36,9 @@ static void ps_report(void)
#else /* GNU/Linux */
sprintf(buf,"ps -o comm,majflt,minflt,rss,drs,pagein,sz,trs,vsz %d 1>&2",getpid() );
#endif
system( buf );
if (system( buf )==-1) {
perror("system call to ps failed");
}
}
void pstats_report()