logd: pidToName deficiency

any logging in zygote permanently sets the pidToName

Change-Id: I0b8fdc96fb5965a04d4dc4293c39815beef5eb8e
This commit is contained in:
Mark Salyzyn 2015-04-20 10:27:38 -07:00
parent aaf9c1b3b4
commit aa43ae2268

View file

@ -186,6 +186,10 @@ struct PidEntry : public EntryBaseDropped {
const char*getName() const { return name; }
inline void add(pid_t p) {
if (name && !strncmp(name, "zygote", 6)) {
free(name);
name = NULL;
}
if (!name) {
char *n = android::pidToName(p);
if (n) {