Set monkey process name

So you can find it easily with "ps" or "top".

Change-Id: Id52cb8bb1680bd2cc24043d08a94f0a304f1e436
This commit is contained in:
Ying Wang
2010-10-07 13:04:24 -07:00
parent 9f62c24a68
commit de14fbd4b1

View File

@@ -404,6 +404,9 @@ public class Monkey {
// Set ro.monkey if it's not set yet.
SystemProperties.set("ro.monkey", "true");
// Set the process name showing in "ps" or "top"
Process.setArgV0("com.android.commands.monkey");
int resultCode = (new Monkey()).run(args);
System.exit(resultCode);
}