• 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: "Safe" frameworks for privileged tools?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Safe" frameworks for privileged tools?


  • Subject: Re: "Safe" frameworks for privileged tools?
  • From: Michael Watson <email@hidden>
  • Date: Wed, 23 Apr 2008 14:35:55 -0400

Yes, it's a helper tool. It runs for a couple of seconds (under normal conditions) and exits immediately. It interacts with the file system by reading information about some directories, so its launched duration is, of course, bound to the responsiveness of the hard drive on which it's operating. As such, "a couple of seconds" might be "five or ten seconds" on machines where the drive is spinning up, otherwise busy, etc. It's certainly possible that someone might invoke fast user switching right in the middle of the tool running, but it's /probably/ not an issue. I'm still not quite convinced it isn't, just yet. I need to do more thinking about it. The discussion so far has been very helpful.

As far as connecting to the window server goes, Apple states:

http://developer.apple.com/technotes/tn2005/tn2083.html#SECWINDOWSERVER

"Apple plans to disable the global window server service in a future release of Mac OS X. Do not write any new code that uses the global window server service."

So when you say "default window server", are you speaking of the global window server, or the default window server associated with the current console session?


-- m-s


On 23 Apr, 2008, at 13:04, stephen joseph butler wrote:
On Wed, Apr 23, 2008 at 11:42 AM, Dave Camp <email@hidden> wrote:

Unless I'm reading the OP wrong, he's writing a privileged helper tool,
not a daemon. Given that, I don't think the above documents are applicable.


None of what I know is official, but just gathered and extrapolated from
years of reading information about this. So I might be wrong... who knows.


The unsafe frameworks make connections to the default window server. As a
program launched from Finder/Dock/et al, this will always work as expected.
Launched from ssh or root, there are some caveats.


For ssh, they will work fine as long as the same user is logged onto the
GUI. As soon as the user logs out, your program loses its connection and
might crash.


For root, they will work as long as the "console user" stays the same. If
someone uses fast user switching, or logs out, then the program's connection
changes and it might crash.


In any event, none of the unsafe frameworks are documented as working in any
conditions other than the normal ones. People may get them to work 90% of
the time under other conditions, but that's unsupported and may change.


So unless DTS tells you otherwise, I'd stay away. But that's me... maybe 90%
is good enough for you.
_______________________________________________


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:
@bungie.org


This email sent to email@hidden

_______________________________________________

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: "Safe" frameworks for privileged tools?
      • From: Chris Suter <email@hidden>
References: 
 >"Safe" frameworks for privileged tools? (From: Michael Watson <email@hidden>)
 >Re: "Safe" frameworks for privileged tools? (From: "stephen joseph butler" <email@hidden>)
 >Re: "Safe" frameworks for privileged tools? (From: "stephen joseph butler" <email@hidden>)

  • Prev by Date: Re: Using OSMemoryBarrier() with KVO
  • Next by Date: Re: QTMovie grabing while playback
  • Previous by thread: Re: "Safe" frameworks for privileged tools?
  • Next by thread: Re: "Safe" frameworks for privileged tools?
  • Index(es):
    • Date
    • Thread