launchctl load and unload com.vivi.control.serviceAgent.plist get error 5: Input/output error

1、 my plist /Library/LaunchAgents/com.vivi.control.serviceAgent.plist like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.vivi.control.serviceAgent</string>
        <key>ProgramArguments</key>
        <array>
            <string>/Users/yuellppa/Downloads/vivo_test</string>
        </array>
        <key>RunAtLoad</key>
        <true/>  
    </dict>
</plist>

when the label is other any name but not "com.vivi.control.serviceAgent", use launchctl load /Library/LaunchAgents/com.vivi.control.serviceAgent.plist

and

launchctl unload /Library/LaunchAgents/com.vivi.control.serviceAgent.plist

is ok.

when label is "com.vivi.control.serviceAgent", launchctl load or launchctl unload get error 5: Input/output error.

use launchctl list | grep com.vivi.control.serviceAgent get nothing, so has no conflicting service。

Can anyone help me take a look?

restart computer is not ok

Don’t run code from your Downloads folder. That directory is protected by MAC, as defined in On File System Permissions, and that causes all sorts of problems when you try to access it outside of the current user context (which is what a launchd daemon is doing).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

launchctl load and unload com.vivi.control.serviceAgent.plist get error 5: Input/output error
 
 
Q