KERN_PROC_ALL produces a kinfo_proc for each thread in a process, which

caused fstat to produce duplicated output for threaded processes.  Instead
use KERN_PROC_PROC to get just one kinfo_proc per process.

MFC After:	2 weeks
This commit is contained in:
Ed Maste 2007-03-09 16:21:40 +00:00
parent 3ff6d22988
commit f9feee175b

View File

@ -164,7 +164,7 @@ main(int argc, char **argv)
int arg, ch, what;
arg = 0;
what = KERN_PROC_ALL;
what = KERN_PROC_PROC;
nlistf = memf = NULL;
while ((ch = getopt(argc, argv, "fmnp:u:vN:M:")) != -1)
switch((char)ch) {