atom feed6 messages in com.apple.lists.darwin-kernelRe: kuncexecute()
FromSent OnAttachments
Mehdi EsmaeelpourJan 9, 2013 4:31 am 
Quinn "The Eskimo!"Jan 9, 2013 4:47 am 
Mehdi EsmaeelpourJan 9, 2013 5:09 am 
Quinn "The Eskimo!"Jan 9, 2013 5:53 am 
Quinn "The Eskimo!"Jan 9, 2013 6:27 am 
Mehdi EsmaeelpourJan 9, 2013 6:47 am 
Subject:Re: kuncexecute()
From:Mehdi Esmaeelpour (mehd@gmail.com)
Date:Jan 9, 2013 6:47:10 am
List:com.apple.lists.darwin-kernel

On Wed, Jan 9, 2013 at 5:57 PM, Quinn "The Eskimo!" <eski@apple.com>wrote:

On 9 Jan 2013, at 14:02, Mehdi Esmaeelpour <mehd@gmail.com> wrote:

My user-space program get the current focused window(application's name)

and i want to use application's name(string) in kernel-space program

Indeed. This present some serious architectural issues. For example:

o it's possible for no user to be logged in

o it's possible for multiple GUI users to be logged in (via any combination of the console and screen sharing)

o it's possible for GUI users to be logged in but with none of them on the console

What are you expecting KUNCExecute to do in these cases?

This gets back to something I mentioned earlier: KUNCExecute was deprecated because it's fundamentally incompatible with the OS X architecture.

In your case you should have a GUI launchd agent, with one instance per GUI login session, that communicates the state of that session to your kernel extension via standard user-to-kernel IPC. These GUI launchd agents will always be running in the correct GUI login context, avoiding a whole world of grief.

You might also want to look at Technote 2083 "Daemons and Agents", which discusses the background to this issue in laborious detail.

<https://developer.apple.com/library/mac/#technotes/tn2083/_index.html>

Share and Enjoy

-- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware

_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darw@lists.apple.com) Help/Unsubscribe/Update your Subscription:

https://lists.apple.com/mailman/options/darwin-kernel/mehdi.esmaeelpour%40gmail.com

This email sent to mehd@gmail.com

Thanks,I test it and send results here

_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darw@lists.apple.com) Help/Unsubscribe/Update your Subscription:

This email sent to