使用 xcode-instruments 运行 UIAutomation 脚本会创建重复的进程,如下所示:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/Developer/usr/bin/ScriptAgent
这些进程无法被杀死,只有系统重启才能杀死它们。 此外,脚本停止并打印这些行:
2013-10-23 14:54:57.850 ScriptAgent[35342:2d07] CLTilesManagerClient: initialize, sSharedTilesManagerClient
2013-10-23 14:54:57.850 ScriptAgent[35342:2d07] CLTilesManagerClient: init
2013-10-23 14:54:57.851 ScriptAgent[35342:2d07] CLTilesManagerClient: reconnecting, 0x962eef0
知道如何解决这个问题吗?
最佳答案
你只需要杀死这些僵尸进程的父进程,它们就会消失。这至少适用于 Mavericks 和 Xcode 5.1:
$ ps -edf | \
grep [x]pcproxy_sim | awk '{print $3}' | \
sort | uniq | \
xargs -I{} echo "kill -9 {}" | sh
第一行列出所有进程。第二行提取xpcproxy_sim
进程的PPID
列(父PID)。第三行删除重复条目,最后一行生成杀死每个进程的命令并将其传递给 shell 执行。
关于ios - Xcode 5 iOS7 - ScriptAgent 进程太多,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19515178/