Hi all,
i search to use kvm_read(3) defined in libkvm for get information about file
descriptor table,
this is my test code:

kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf);
if (kd == NULL)
errx(1, "%s", kvm_geterr(kd));

if ((ki_p = kvm_getprocs(kd, KERN_PROC_PID, pid_to_search, &nentries)) ==
errx(2, "%s", kvm_geterr(kd));

if (ki_p->ki_fd == NULL)
errx(3, "%s", kvm_geterr(kd));

if(!kvm_read(kd, (u_long)(ki_p->ki_fd), &filed, sizeof(filed)))
errx(4, "%s", kvm_geterr(kd));

kvm_read report: "getproc: short read" (getproc is the name of program),

can anyone help me ?