• 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: Unable to unload Launch Daemon using Cocoa Application.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to unload Launch Daemon using Cocoa Application.


  • Subject: Re: Unable to unload Launch Daemon using Cocoa Application.
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 23 Mar 2008 08:52:59 -0700


On 23 Mar '08, at 7:00 AM, JanakiRam wrote:

I'm developing a cocoa application which needs to unload my Launch
Daemon for one particular requirement. I've used Authorization Services to
perform unload of Launch Daemon ( previlaged action ). But couldn't succeed
in this. I'm getting the following error on executed my code.


*Output :*
**
*lauchctl : Error in unloading mydaemon*

I don't know anything about the authorization API, but I've worked with launchctl before (though only with per-user agents.)


It looks like the problem isn't with your authorization code, but with unloading the daemon.

Have you tried running the same launchctl command-line from a shell, with and without "sudo"? Do you get the same error? (If so, perhaps there's more info in the output. Or check Console.app for output in ASL or system.log).

If it works OK from a shell, then try changing your code to run something else, like maybe "rm" on a file owned by root, to make sure the authorization part works correctly.

Debugging is a science. If an experiment gives an inexplicable result, start varying parameters one at a time and see what changes.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: Unable to unload Launch Daemon using Cocoa Application.
      • From: JanakiRam <email@hidden>
References: 
 >Unable to unload Launch Daemon using Cocoa Application. (From: JanakiRam <email@hidden>)
 >Re: Unable to unload Launch Daemon using Cocoa Application. (From: JanakiRam <email@hidden>)

  • Prev by Date: Re: NSImage > trapezium...
  • Next by Date: [ANN] RegexKitLite
  • Previous by thread: Re: Unable to unload Launch Daemon using Cocoa Application.
  • Next by thread: Re: Unable to unload Launch Daemon using Cocoa Application.
  • Index(es):
    • Date
    • Thread