}
}
+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);
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);
}