Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Current Process



On Tuesday, June 10, 2003, at 09:53 AM, Joseph Gabriel Echeverria wrote:

How can I get the current process from inside a kernel extension? I've
tried calling currentProcess(), but when that is included, the KEXT won't
load becuase of unresolved symbols.

The call is current_proc_EXTERNAL(), which gets you a 'struct proc *'. You have to be *very* careful in using the result; check for NULL, and make sure that you fully understand the context in which your driver is running when you call it. Getting the identity of the current process at random points in your driver's execution path may give you an equally random process.

What are you trying to do?

Regards,

Justin

--
/~\ The ASCII Justin C. Walker, Curmudgeon-at-Large
\ / Ribbon Campaign
X Help cure HTML Email
/ \
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.