Fix several issues related to process information on OpenBSD and drop lsof usage.

This commit is contained in:
Robert Nagy
2014-01-23 10:39:39 +01:00
committed by Jasper Lievisse Adriaanse
parent ff07ba102f
commit df1db43032
3 changed files with 125 additions and 150 deletions

View File

@@ -55,6 +55,7 @@ glibtop_open_p (glibtop *server, const char *program_name,
const unsigned long features,
const unsigned flags)
{
char errbuf[_POSIX2_LINE_MAX];
#ifdef DEBUG
fprintf (stderr, "DEBUG (%d): glibtop_open_p ()\n", getpid ());
#endif
@@ -69,7 +70,7 @@ glibtop_open_p (glibtop *server, const char *program_name,
server->os_version_code = OpenBSD;
/* Setup machine-specific data */
server->machine.kd = kvm_open (NULL, NULL, NULL, O_RDONLY, "kvm_open");
server->machine.kd = kvm_openfiles (NULL, NULL, NULL, O_RDONLY, errbuf);
if (server->machine.kd == NULL)
glibtop_error_io_r (server, "kvm_open");