X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fprocesses.c;h=5a09b57313553c618ce5f95cf6b28cba7c770257;hb=b57d6e25aa792f0461aee4e5bd6d1838c478af50;hp=68f30a5a30e87737cc7c12a1855dbb5787e19645;hpb=102e4f4ff7e99650b5624a7af1ba3885975a0b8c;p=collectd.git diff --git a/src/processes.c b/src/processes.c index 68f30a5a..5a09b573 100644 --- a/src/processes.c +++ b/src/processes.c @@ -1791,7 +1791,7 @@ static int ps_read (void) int wait = 0; kvm_t *kd; - char errbuf[1024]; + char errbuf[_POSIX2_LINE_MAX]; struct kinfo_proc *procs; /* array of processes */ struct kinfo_proc *proc_ptr = NULL; int count; /* returns number of processes */ @@ -1803,7 +1803,7 @@ static int ps_read (void) ps_list_reset (); /* Open the kvm interface, get a descriptor */ - kd = kvm_open (NULL, NULL, NULL, 0, errbuf); + kd = kvm_openfiles (NULL, "/dev/null", NULL, 0, errbuf); if (kd == NULL) { ERROR ("processes plugin: Cannot open kvm interface: %s",