Skip to content

Commit

Permalink
Fix ProcessInspector::threads().
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuo committed Apr 3, 2015
1 parent 7b6c553 commit 7a454a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion muduo/net/inspect/ProcessInspector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ string ProcessInspector::threads(HttpRequest::Method, const Inspector::ArgList&)
{
char buf[256];
int tid = threads[i];
snprintf(buf, sizeof buf, "/proc/%d/stat", tid);
snprintf(buf, sizeof buf, "/proc/%d/task/%d/stat", ProcessInfo::pid(), tid);
if (FileUtil::readFile(buf, 65536, &stat) == 0)
{
StringPiece name = ProcessInfo::procname(stat);
Expand Down

0 comments on commit 7a454a0

Please sign in to comment.