ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/statgrab/statgrab.c
(Generate patch)

Comparing projects/libstatgrab/src/statgrab/statgrab.c (file contents):
Revision 1.10 by ats, Sat Oct 18 16:12:03 2003 UTC vs.
Revision 1.12 by ats, Mon Oct 20 22:18:21 2003 UTC

# Line 369 | Line 369 | void populate_page() {
369          if (page != NULL) {
370                  add_stat(LONG_LONG, &page->pages_pagein, "page", "in", NULL);
371                  add_stat(LONG_LONG, &page->pages_pageout, "page", "out", NULL);
372 <                add_stat(LONG_LONG, &page->systime, "page", "systime", NULL);
372 >                add_stat(TIME_T, &page->systime, "page", "systime", NULL);
373          }
374   }
375  
# Line 602 | Line 602 | int main(int argc, char **argv) {
602                  use_diffs = 1;
603  
604          select_interesting(argc - optind, &argv[optind]);
605 +
606 +        /* We don't care if statgrab_init fails, because we can just display
607 +           the statistics that can be read as non-root. */
608 +        statgrab_init();
609 + #ifdef ALLBSD
610 +        if (setegid(getgid()) != 0)
611 +                die("Failed to lose effective group");
612 + #endif
613  
614          switch (repeat_mode) {
615          case REPEAT_NONE:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines