Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Oct 1998 14:10:27 -0700 (PDT)
From:      Alex <garbanzo@hooked.net>
To:        current <current@FreeBSD.ORG>
Subject:   Something else seems to be leaking...
Message-ID:  <Pine.BSF.4.00.9810061405260.1673-100000@zippy.dyn.ml.org>

next in thread | raw e-mail | index | archive | help
Welp.  I finally got aorund to toying with kcminfo (some obscure thing
from KDE), and it's leaking like a sieve.  Naturally I think that it's to
blame, however I've managed to narrow it down to a few lines of code
(which have been reported to not leak on -stable):

  /*	Q&D hack for swap display. Borrowed from xsysinfo-1.4  */
  if ((pipe = popen("/usr/sbin/pstat -ks", "r")) == NULL) {
     used = total = 1;
     return;
  }
  fgets(buf, sizeof(buf), pipe);
  fgets(buf, sizeof(buf), pipe);
  fgets(buf, sizeof(buf), pipe);
  fgets(buf, sizeof(buf), pipe);
  strtok(buf, " ");
  total_str = strtok(NULL, " ");
  used_str = strtok(NULL, " ");
  pclose(pipe);

Commenting everything but the popen and pclose things, doesn't seem to fix
anything.  This is called from some sort of timer every second or so, so
the leak is rather apparent.

- alex

| "Contrary to popular belief, penguins are not the salvation of modern  |
| technology.  Neither do they throw parties for the urban proletariat." |
| Powered by FreeBSD                            http://www.freebsd.org/  |


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.00.9810061405260.1673-100000>