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

Comparing projects/libstatgrab/src/libstatgrab/process_stats.c (file contents):
Revision 1.71 by tdb, Thu Apr 8 17:20:51 2004 UTC vs.
Revision 1.73 by tdb, Mon Jun 21 14:48:48 2004 UTC

# Line 412 | Line 412 | sg_process_stats *sg_get_process_stats(int *entries){
412                                  return NULL;
413                          }
414                          p = proctitle;
415 + #ifdef OPENBSD
416 +                        /* On OpenBSD, this value has the argv pointers (which
417 +                         * are terminated by a NULL) at the front, so we have
418 +                         * to skip over them to get to the strings. */
419 +                        while (*(char ***)p != NULL) {
420 +                                p += sizeof(char **);
421 +                        }
422 +                        p += sizeof(char **);
423 + #endif
424                          proc_state_ptr->proctitle[0] = '\0';
425                          do {
426                                  sg_strlcat(proc_state_ptr->proctitle, p, size+1);
# Line 592 | Line 601 | sg_process_stats *sg_get_process_stats(int *entries){
601                          proc_state_ptr->state = SG_PROCESS_STATE_UNKNOWN;
602                          break;
603                  }
604 +
605 +                free(kl_stats);
606   #else
607   #ifdef FREEBSD5
608                  switch (kp_stats[i].ki_stat) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines