Re: Getting the current PID inside kext?
Re: Getting the current PID inside kext?
- Subject: Re: Getting the current PID inside kext?
- From: "Justin C. Walker" <email@hidden>
- Date: Mon, 30 Oct 2006 21:13:46 -0800
On Oct 30, 2006, at 21:00 , Rick Mann wrote:
getpid() doesn't seem to be available to a kext (I try to include
<unistd.h> but it fails).
If you are trying to use this header in a kernel extension, you may
not fully understand the programming model. Nothing in /usr/include
is usable in the kernel or its extensions. Nothing in /usr/lib is
usable in the kernel. Some functions and definitions that occur in /
usr/include may be provided by the kernel, but they aren't really the
same.
Can I use <sys/proc.h> and extern_proc with current_proc() to get
at the pid?
You should review the KPI documents to see how to interact with the
kernel. Check the Apple developer website:
<http://developer.apple.com/documentation/Darwin/Conceptual/
KEXTConcept/KEXTConceptDependencies/kext_dependencies.html>
Justin
--
Justin C. Walker, Curmudgeon-at-Large
() The ASCII Ribbon Campaign
/\ Help Cure HTML Email
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden