質問

Running UIAutomation scripts using xcode-instruments creates duplicate processes like this:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/Developer/usr/bin/ScriptAgent

These processes can't be killed and only system reboot will kill them. Also, the script is stopped and these lines are printed:

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

Any idea how to solve this?

役に立ちましたか?

解決

You only need to kill the parent process of these zombie processes, and they will go away. This works in Mavericks and Xcode 5.1, at least:

$ ps -edf | \
grep [x]pcproxy_sim | awk '{print $3}' | \
sort | uniq | \
xargs -I{} echo "kill -9 {}" | sh

The first line lists all processes. The second line extracts the PPID column (parent PID) of xpcproxy_sim processes. The third line removes duplicate entries, and the last line generates the command to kill each process and passes it to a shell for execution.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top