
一個名為 GitHub Conduit 的程式(Mac 版 GitHub)在我的計算機後台運行。如果我殺死它,則launchd
重新啟動它。
線上說明launchd
頁面列出了它在啟動時查找作業的每個位置:
$ man launchd
[snip]
FILES
~/Library/LaunchAgents Per-user agents provided by the user.
/Library/LaunchAgents Per-user agents provided by the adminis-
trator.
/Library/LaunchDaemons System-wide daemons provided by the admin-
istrator.
/System/Library/LaunchAgents Per-user agents provided by Mac OS X.
/System/Library/LaunchDaemons System-wide daemons provided by Mac OS X.
我檢查了每個資料夾,然後GitHub 管道中沒有任何文件。我還檢查了“使用者和群組”首選項,它沒有列在我的登入項目中。
FWIW,launchctl list com.github.GitHub.Conduit
輸出:
{
"Label" = "com.github.GitHub.Conduit";
"LimitLoadToSessionType" = "Aqua";
"OnDemand" = true;
"LastExitStatus" = 15;
"PID" = 596;
"TimeOut" = 30;
"ProgramArguments" = (
"/usr/libexec/launchproxyls";
"com.github.GitHub.Conduit";
);
"EnableTransactions" = true;
"MachServices" = {
"com.github.GitHub.Conduit" = mach-port-object;
};
"PerJobMachServices" = {
"com.apple.CFPasteboardClient" = mach-port-object;
"com.apple.tsm.portname" = mach-port-object;
"com.apple.axserver" = mach-port-object;
};
};
問題
是什麼讓launchd
GitHub Conduit 在啟動時啟動?
答案1
答案2
破解了!在 OS X 10.11 中,首選項儲存在此:
/var/db/com.apple.xpc.launchd/loginitems.{uid}.plist
對我來說,該文件如下所示:
<?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>com.github.GitHub.Conduit</key>
<string>com.github.GitHub</string>
<key>version.com.github.GitHub.Conduit</key>
<string>161</string>
</dict>
</plist>