Re: Current Process
Re: Current Process
- Subject: Re: Current Process
- From: "Justin C. Walker" <email@hidden>
- Date: Tue, 10 Jun 2003 11:15:13 -0700
On Tuesday, June 10, 2003, at 10:47 AM, Joseph Gabriel Echeverria wrote:
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.
No, actually, it's not the best way to go. For one thing, there's no
guarantee that the ability to do this sort of thing will be preserved
across releases. For another, there really are better ways to do it.
If this is a localized, "I'm just doing it for my own amusement" kind
of hack, you can get away with it. If this is intended to be part of
an application "architecture", you aren't doing yourself or your
customers any favors.
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?
You can go where no man has gone before, and tackle syslog.conf. It's
not for the timid, but by judiciously choosing selector and levels, and
arranging the file 'syslog.conf' just so, you can have your messages
end up in a file of your choosing. Be wary of changing this, though.
The relationship between entries is delicate, and some things (logging)
might stop working (and it could be a long time before you'd notice).
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | When LuteFisk is outlawed
| Only outlaws will have
| LuteFisk
*--------------------------------------*-------------------------------*
_______________________________________________
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.