【问题标题】:Xcode 5 iOS7 - too many ScriptAgent processesXcode 5 iOS7 - ScriptAgent 进程太多
【发布时间】:2013-10-31 03:56:56
【问题描述】:

使用 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

知道如何解决这个问题吗?

【问题讨论】:

  • 你想如何杀死他们?
  • 1. ps辅助| grep ScriptAgent 2. sudo kill -9 pid
  • 这似乎并没有杀死他们
  • 我可以确认这些 PID 上的 sudo kill -9 什么都不做。 xpcproxy_sim 的多个实例的情况相同。
  • 找到解决办法,发布答案。

标签: ios xcode ios-simulator xcode5 xcode-instruments


【解决方案1】:

你只需要杀死这些僵尸进程的父进程,它们就会消失。这至少适用于 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 执行。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-09-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-14
    • 2013-09-16
    相关资源
    最近更新 更多