- proc_stat = fopen ("/proc/stat", "r");
- if (NULL == proc_stat)
- GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "fopen", "/proc/stat");
+ updateUsage (); /* initialize */
+ /* Most GNUnet processes don't really need this, so close the FD, but allow
+ re-opening it (unless we failed) */
+ if (proc_stat != NULL)
+ {
+ GNUNET_break (0 == fclose (proc_stat));
+ proc_stat = NULL;
+ first_time = 0;
+ }