Handle long process names correctly.
pthread_setname_np() expects 16 or fewer characters for the name argument. When the process name is longer, we should trim it.
Change-Id: I40be3a4212bdaab900c8eb30fa27aeeb7ed1b0d1
diff --git a/include/android_runtime/AndroidRuntime.h b/include/android_runtime/AndroidRuntime.h
index 9a3b990..ed77d9a 100644
--- a/include/android_runtime/AndroidRuntime.h
+++ b/include/android_runtime/AndroidRuntime.h
@@ -44,7 +44,7 @@
Tool,
};
- void setArgv0(const char* argv0);
+ void setArgv0(const char* argv0, bool setProcName = false);
void addOption(const char* optionString, void* extra_info = NULL);
/**