projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ignore first SIGINT
[lttng-tools.git]
/
kconsumerd
/
kconsumerd.c
diff --git
a/kconsumerd/kconsumerd.c
b/kconsumerd/kconsumerd.c
index 8e8f1a6188c1b322449992fb4fd904218cb993a9..adc1f1beddeb79b68796258289cea9edf2e532e1 100644
(file)
--- a/
kconsumerd/kconsumerd.c
+++ b/
kconsumerd/kconsumerd.c
@@
-67,6
+67,9
@@
static int poll_pipe[2];
/* socket to communicate errors with sessiond */
static int error_socket = -1;
/* socket to communicate errors with sessiond */
static int error_socket = -1;
+/* to count the number of time the user pressed ctrl+c */
+static int sigintcount = 0;
+
/* Argument variables */
int opt_quiet;
int opt_verbose;
/* Argument variables */
int opt_quiet;
int opt_verbose;
@@
-185,6
+188,11
@@
end:
*/
static void sighandler(int sig)
{
*/
static void sighandler(int sig)
{
+ if (sig == SIGINT && sigintcount++ == 0) {
+ DBG("ignoring first SIGINT");
+ return;
+ }
+
cleanup();
return;
cleanup();
return;
This page took
0.023622 seconds
and
4
git commands to generate.