• 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: launchd agents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: launchd agents


  • Subject: Re: launchd agents
  • From: Keith Duncan <email@hidden>
  • Date: Sun, 12 Nov 2006 15:30:45 +0000

Thanks for your reply. Maybe this will have been fixed by Leopard.

In the interim I've actually found a solution, albeit a less elegant one. I've moved all of my GUI code into a separate application target that I launch using NSTask when user input is need, the .app has LSBackgroundOnly set in its plist so the entire procedure is still invisible to the end user as I had intended. Piping data back into the Agent is then simple using the existing NSConnection I setup to recieve data from other Apps.

The only code I could get to work to launch the external app is:

NSTask *app = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/open" arguments:[NSArray arrayWithObjects:@"-a", appPath, nil]];

Is there anyway to launch the app directly (without using /usr/bin/ open) so that I can retain a handle on it and terminate it after a timeout?


On 12 Nov 2006, at 09:41, Finlay Dobbie wrote:

As has been explained in the past on darwin-dev, LaunchAgents are
basically unusable in Tiger because of this. Your best solution will
be to use one of the other methods detailed in
<http://developer.apple.com/technotes/tn2005/tn2083.html>.

-- Finlay
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: launchd agents
      • From: Uli Kusterer <email@hidden>
References: 
 >launchd agents (From: Keith Duncan <email@hidden>)
 >Re: launchd agents (From: "Finlay Dobbie" <email@hidden>)

  • Prev by Date: Re: NSString converted into unicode
  • Next by Date: NSColor to CGColor
  • Previous by thread: Re: launchd agents
  • Next by thread: Re: launchd agents
  • Index(es):
    • Date
    • Thread