• 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: launch agent questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: launch agent questions


  • Subject: Re: launch agent questions
  • From: Dave Zarzycki <email@hidden>
  • Date: Thu, 15 Jun 2006 14:14:13 -0700

On Jun 14, 2006, at 10:43 AM, Alex Sheh wrote:

I have a few questions related to launch agents.  I realize that there is only one launchd per user, so a GUI session and an ssh login session will not have separate launchd’s, and I’m fine with that (otherwise, I believe loginwindow plist would be recommended). 
 
I have a launch agent that I want to run whenever the user logs in via the GUI window.  I noticed that I need to call system(“launchctl unload com.myCompany.myAgent.plist”) at then very end of executable myAgent, in order for my launch agent to be run again after logging out and logging back in via GUI.  Otherwise my launch agent plist remains loaded and the next time I log back in, nothing happens.  Is this method of unloading at the end of the executable reasonable, or is there another more standard way of doing this?

I'm terribly sorry to report that LaunchAgents are for all practical purposes, busted in Tiger. I'd advise against using them until Leopard. Sorry.

Also, my launch agent really just fires off some other programs and does some synchronization, so it exits after a few seconds.  Is there any way for me to get around the error “9 more failures without living at least 60 seconds will cause job removal”?  I’d rather not add a sleep(60) in my executable. 

I think we have that fixed already in Leopard, but I could be wrong.

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

This email sent to email@hidden

  • Follow-Ups:
    • Re: launch agent questions
      • From: Stephane Sudre <email@hidden>
References: 
 >launch agent questions (From: "Alex Sheh" <email@hidden>)

  • Prev by Date: Re: DirectoryServices-258: dsDataListInsertAfter() logic bug
  • Next by Date: i386_signal_cpu
  • Previous by thread: launch agent questions
  • Next by thread: Re: launch agent questions
  • Index(es):
    • Date
    • Thread