Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147459
b: refs/heads/master
c: 58d7e99
h: refs/heads/master
i:
  147457: e4fe9c6
  147455: cada1d8
v: v3
  • Loading branch information
Ingo Molnar committed May 15, 2009
1 parent 9f8f3d4 commit 1573099
Show file tree
Hide file tree
Showing 2 changed files with 17 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: 251e8e3c7235f5944805a64f24c79fc4696793f1
refs/heads/master: 58d7e993b16b62d30f8ef27757614056fe4def11
16 changes: 16 additions & 0 deletions trunk/Documentation/perf_counter/builtin-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,14 @@ static void process_options(int argc, char **argv)
}
}

static void skip_signal(int signo)
{
}

int cmd_stat(int argc, char **argv, const char *prefix)
{
sigset_t blocked;

page_size = sysconf(_SC_PAGE_SIZE);

process_options(argc, argv);
Expand All @@ -548,5 +554,15 @@ int cmd_stat(int argc, char **argv, const char *prefix)
assert(nr_cpus <= MAX_NR_CPUS);
assert(nr_cpus >= 0);

/*
* We dont want to block the signals - that would cause
* child tasks to inherit that and Ctrl-C would not work.
* What we want is for Ctrl-C to work in the exec()-ed
* task, but being ignored by perf stat itself:
*/
signal(SIGINT, skip_signal);
signal(SIGALRM, skip_signal);
signal(SIGABRT, skip_signal);

return do_perfstat(argc, argv);
}

0 comments on commit 1573099

Please sign in to comment.