• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Fast user switching notifications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fast user switching notifications


  • Subject: Re: Fast user switching notifications
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Tue, 12 Mar 2013 16:00:16 +0100

Le 11 mars 2013 à 23:25, Jean Suisse <email@hidden> a écrit :

> Dear All,
>
> There may be several approaches to solve the issue I am about to describe, either on the userland side or on the kernel side... or in-between, using a daemon.
>
> Current situation
> A bsd kernel extension communicates with a regular userland application (called theApp). The kext gathers statistics, sends data to the user, takes orders from the user, etc.. There are two-way communications initiated by both sides using control sockets – There may be no market for such app, it is more of investigation tool, but that's irrelevant.
>
> Goal
> I would need to handle fast user switching, so that data sent by the kext are directed towards the user that can actually handle them. This user is the one "owning" the graphic interface (is there a technical word to say that?).
>
> Issue
> When switching from user(A) to user(B) (using fast user switching for instance), user(A) no longer owns the graphic interface and theApp(A) is no longer able to interact with the user and give the required feedback to the kext. User(B) starts theApp(B) and interacts normally with the kext. Then, when switching from B to A, the same issue occurs in reverse.
>
> Solution
> One approach would be to have theApp(A) launched by user(A) to be notified when user(A) looses access to the graphic interface.
> When switching back to user(A) theApp(A) and theApp(B) would also get notified.
>
> I read this document (https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPMultipleUsers/Concepts/UserSwitchNotifications.html), but it seems that there is some race condition occurring, maybe as a result of interacting with the kernel (the kext must perform a few tasks before allowing theApp(A) to disconnect and theApp(B) to connect).
>
> Are there any other alternatives, from the userland side ?


There is an other way to track the current user: using the SystemConfiguration framework notification:

http://developer.apple.com/library/mac/#qa/qa1133/_index.html

-- Jean-Daniel





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Fast user switching notifications
      • From: Jean Suisse <email@hidden>
References: 
 >Fast user switching notifications (From: Jean Suisse <email@hidden>)

  • Prev by Date: Re: Objective-C Question
  • Next by Date: Re: Objective-C Question
  • Previous by thread: Fast user switching notifications
  • Next by thread: Re: Fast user switching notifications
  • Index(es):
    • Date
    • Thread