On 16/03/12 12:39 +0530, kota saikrishna wrote: > I need to get process data structure using a pid. I found the pfind > function which returns struct proc * but when i tried to use pfind > function it is showing ---undefined reference to `pfind' > Can any one suggest how to use pfind() function? > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Hi, pfind and friends looks like kernel only function. I can suggest you to explore the sysctl(3) way to recover the kern.proc structures. There are fexw examples on the internet, you can check a code I wrote few years ago to recover the battery state in my laptop using sysctl ; hope this help. http://www.bebik.net/doku.php/battery_life_and_sysctl_3 Regards, Rodrigo _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"