diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-04-28 14:07:23 -0700 |
---|---|---|
committer | JP Abgrall <jpa@google.com> | 2014-04-29 00:37:37 +0000 |
commit | 8daa9af02dc0e63ce220e3fa95bf5fe4d6b7a99a (patch) | |
tree | a9777346b5a82e54c698f895271a99e6364c1df6 /logd/LogAudit.cpp | |
parent | ab3d49b03527d5fc65664f66ddb78c98450c8c84 (diff) | |
download | system_core-8daa9af02dc0e63ce220e3fa95bf5fe4d6b7a99a.zip system_core-8daa9af02dc0e63ce220e3fa95bf5fe4d6b7a99a.tar.gz system_core-8daa9af02dc0e63ce220e3fa95bf5fe4d6b7a99a.tar.bz2 |
logd: add thread setname
- permits easier determination of logd thread at
fault in a stack trace from debuggerd.
Bug: 14275676
Change-Id: Iac2c523147e2bcce34ab7ddcecd02582c5fa7cc0
Diffstat (limited to 'logd/LogAudit.cpp')
-rw-r--r-- | logd/LogAudit.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/logd/LogAudit.cpp b/logd/LogAudit.cpp index ea6eece..1056ae4 100644 --- a/logd/LogAudit.cpp +++ b/logd/LogAudit.cpp @@ -19,6 +19,7 @@ #include <stdarg.h> #include <stdlib.h> #include <sys/klog.h> +#include <sys/prctl.h> #include <sys/uio.h> #include "libaudit.h" @@ -34,6 +35,8 @@ LogAudit::LogAudit(LogBuffer *buf, LogReader *reader, int fdDmsg) } bool LogAudit::onDataAvailable(SocketClient *cli) { + prctl(PR_SET_NAME, "logd.auditd"); + struct audit_message rep; if (audit_get_reply(cli->getSocket(), &rep, GET_REPLY_BLOCKING, 0) < 0) { |