Re: Deadlock in My KEXT with NKE
Re: Deadlock in My KEXT with NKE
- Subject: Re: Deadlock in My KEXT with NKE
- From: matt jaffa <email@hidden>
- Date: Thu, 12 Feb 2004 12:43:14 -0700
So what type of 'channel' is this?
I have heard of sockets communicating between the two, but someone
suggested it is not a good idea. And to connect up the two sockets
through AF_UNIX type is too hard.
Also heard of sysctlbyname, but as you pointed out, what if the
daemon dies.
Also Heard of communicating through the IOKit way, where it gets a
mach_port and can do it that way, but your KEXT needs to be an IOKit
, while mine is a NKE.
Is there a channel I am missing, or is it one of those above and I am
missing something?
Thanks,
Matt
On Thursday, February 12, 2004, at 12:24 PM, Justin Walker wrote:
On Thursday, February 12, 2004, at 11:04 AM, matt jaffa wrote:
Right now I am having my Daemon do a sysctlbyname and setting a
value in the KEXT to make it aware that it is running, does this
sound like an ok way to do it.
Sort of. The problem of course is that there is no way to guarantee
that the sysctl variable gets 'reset' when the daemon exits (e.g.,
when it gets a memory fault). With Vincent's suggestion of a
'channel', if there are "process exit" semantics with it (like file
descriptors - always 'closed' on exit), then you don't have to worry
too much about failure modes.
Cheers,
Justin
On Thursday, February 12, 2004, at 11:20 AM, Vincent Lubet wrote:
On Feb 11, 2004, at 6:25 PM, Matt Jaffa wrote:
Also is there a way for the KEXT to detect if a daemon is running?
This is done by having the daemon to initiate some kind of
communication channel to the KEXT. This way the daemon becomes a
kind of client of the KEXT. If there are no communication channel,
there is no daemon running.
Vincent
_______________________________________________
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.
--
/~\ 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.