* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: database.c,v 1.21 2000-09-03 14:32:19 thib Exp $ */
+ /* $Id: database.c,v 1.22 2000-09-03 19:03:10 thib Exp $ */
#include "fcron.h"
FILE *f = NULL;
float fl = 0;
- if ( (f = fopen(PROC "loadavg", "r")) == NULL )
+ if ( (f = fopen(PROC "loadavg", "r")) == NULL ) {
error_e("could not open '"PROC"loadavg' (make sure /proc is mounted)");
+ l_avg[0] = 0;
+ l_avg[1] = 0;
+ l_avg[2] = 0;
+ return;
+ }
fscanf(f, "%f", &fl);
l_avg[0] = fl * 10;