launchk icon indicating copy to clipboard operation
launchk copied to clipboard

Incorrect handling of unload for LaunchDaemons

Open mach-kernel opened this issue 3 years ago • 0 comments

To reproduce:

  • Start launchk as non-root user
  • Find a */Daemon service (org.cups.cupsd is a good one)
  • Try to unload it (or do anything)

It will silently fail. Same as doing this, which is wrong:

$ launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist
Warning: Expecting a LaunchAgents path since the command was ran as user. Got LaunchDaemons instead.
`launchctl bootout` is a recommended alternative.
Unload failed: 5: Input/output error
Try running `launchctl bootout` as root for richer errors.

mach-kernel avatar Sep 06 '22 20:09 mach-kernel