aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/process_iterator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/process_iterator.c b/src/process_iterator.c
index fd35952..f0cee92 100644
--- a/src/process_iterator.c
+++ b/src/process_iterator.c
@@ -84,11 +84,13 @@ int close_process_iterator(struct process_iterator *it) {
#include <sys/sysctl.h>
#include <sys/user.h>
+#include <fcntl.h>
+#include <paths.h>
int init_process_iterator(struct process_iterator *it) {
char errbuf[_POSIX2_LINE_MAX];
/* Open the kvm interface, get a descriptor */
- if ((it->kd = kvm_open(NULL, NULL, NULL, 0, errbuf)) == NULL) {
+ if ((it->kd = kvm_openfiles(NULL, _PATH_DEVNULL, NULL, O_RDONLY, errbuf)) == NULL) {
/* fprintf(stderr, "kvm_open: %s\n", errbuf); */
fprintf(stderr, "kvm_open: %s", errbuf);
return -1;
Un proyecto texto-plano.xyz