Skip to content

Commit

Permalink
perf daemon: Return from kill functions
Browse files Browse the repository at this point in the history
We should return correctly and warn in both daemon_session__kill() and
daemon__kill() after we tried everything to kill sessions.  The current
code will keep on looping and waiting.

Signed-off-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Michael Petlan <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
olsajiri authored and acmel committed Mar 24, 2021
1 parent 1833b64 commit 9f177fd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/perf/builtin-daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,9 @@ static void daemon_session__kill(struct daemon_session *session,
daemon_session__signal(session, SIGKILL);
break;
default:
break;
pr_err("failed to wait for session %s\n",
session->name);
return;
}
how++;

Expand Down Expand Up @@ -961,7 +963,8 @@ static void daemon__kill(struct daemon *daemon)
daemon__signal(daemon, SIGKILL);
break;
default:
break;
pr_err("failed to wait for sessions\n");
return;
}
how++;

Expand Down

0 comments on commit 9f177fd

Please sign in to comment.