Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169560
b: refs/heads/master
c: 7f3bedc
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and Ingo Molnar committed Oct 27, 2009
1 parent 31b03ed commit f377977
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fcd14b3203b538dca04a2b065c774c0b57863eec
refs/heads/master: 7f3bedcc93f935631d2363f23de1cc80f04fdf3e
4 changes: 4 additions & 0 deletions trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ static pid_t pid_synthesize_comm_event(pid_t pid, int full)

fp = fopen(filename, "r");
if (fp == NULL) {
out_race:
/*
* We raced with a task exiting - just return:
*/
Expand Down Expand Up @@ -247,6 +248,9 @@ static pid_t pid_synthesize_comm_event(pid_t pid, int full)
snprintf(filename, sizeof(filename), "/proc/%d/task", pid);

tasks = opendir(filename);
if (tasks == NULL)
goto out_race;

while (!readdir_r(tasks, &dirent, &next) && next) {
char *end;
pid = strtol(dirent.d_name, &end, 10);
Expand Down

0 comments on commit f377977

Please sign in to comment.