mach-kernel / launchk

Cursive TUI that queries XPC to peek at launchd state

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect handling of unload for LaunchDaemons

mach-kernel opened this issue · 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.