第一步:创建plist配置文件,并将它存储在
~/Library/LaunchAgents/com.inmix.word.osx.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.inmix.word.osx</string>
<key>Program</key>
<string>你的应用程序路径</string>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
第二步测试你的守护进程
launchctl load ~/Library/LaunchAgents/com.inmix.word.osx.plist
launchctl unload ~/Library/LaunchAgents/com.inmix.word.osx.plist
原文:https://blog.51cto.com/adadream/2488907