Re: Current Process
Re: Current Process
- Subject: Re: Current Process
- From: Joseph Gabriel Echeverria <email@hidden>
- Date: Tue, 10 Jun 2003 13:47:26 -0400 (EDT)
I'm trying to find away to dump some info to a file from within a driver,
I know this isn't a good idea in general, but it's the best way to go
about it in my situation because I don't want to have another user process
to do it for me. The method I'm trying is something that was sugested on
one of the darwin lists (don't remember which one or when). The person
sugested calling the entry point for the open syscall and the writing to
the file with the entry point for the write syscall. These entry points
require a struct proc * to be passed in. Is there another way my KEXT can
get output to a file that isn't system.log?
-Joey
On Tue, 10 Jun 2003, Justin C. Walker wrote:
>
>
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.