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.72 by ats, Thu Apr 8 23:30:29 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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines