Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223033
b: refs/heads/master
c: 18483b8
h: refs/heads/master
i:
  223031: efef491
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Dec 6, 2010
1 parent d5fed6f commit ba7f0ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60e677373be9c0bf7c9a22937601d5a40e51c042
refs/heads/master: 18483b81ee7e70ee68d4b18be618be5cfcc0b290
6 changes: 4 additions & 2 deletions trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static void sig_atexit(void)
if (child_pid > 0)
kill(child_pid, SIGTERM);

if (signr == -1)
if (signr == -1 || signr == SIGUSR1)
return;

signal(signr, SIG_DFL);
Expand Down Expand Up @@ -515,6 +515,7 @@ static int __cmd_record(int argc, const char **argv)
atexit(sig_atexit);
signal(SIGCHLD, sig_handler);
signal(SIGINT, sig_handler);
signal(SIGUSR1, sig_handler);

if (forks && (pipe(child_ready_pipe) < 0 || pipe(go_pipe) < 0)) {
perror("failed to create pipes");
Expand Down Expand Up @@ -606,6 +607,7 @@ static int __cmd_record(int argc, const char **argv)
execvp(argv[0], (char **)argv);

perror(argv[0]);
kill(getppid(), SIGUSR1);
exit(-1);
}

Expand Down Expand Up @@ -762,7 +764,7 @@ static int __cmd_record(int argc, const char **argv)
}
}

if (quiet)
if (quiet || signr == SIGUSR1)
return 0;

fprintf(stderr, "[ perf record: Woken up %ld times to write data ]\n", waking);
Expand Down

0 comments on commit ba7f0ec

Please sign in to comment.