From fb7ef9ec29c6187353bc5527f0b2e2017537aaba Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 29 Jun 2014 10:53:40 +0200 Subject: [PATCH] Logs when a SIGINT is received. --- cmdline/state.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmdline/state.c b/cmdline/state.c index ce095649..0334a6c1 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -4254,6 +4254,8 @@ int state_progress_begin(struct snapraid_state* state, block_off_t blockstart, b if (!state->opt.gui) { printf("Not starting for interruption\n"); } + fprintf(stdlog, "sigint:0: SIGINT received\n"); + fflush(stdlog); return 0; /* LCOV_EXCL_STOP */ } @@ -4366,6 +4368,8 @@ int state_progress(struct snapraid_state* state, block_off_t blockpos, block_off printf("\n"); printf("Stopping for interruption at block %u\n", blockpos); } + fprintf(stdlog, "sigint:%u: SIGINT received\n", blockpos); + fflush(stdlog); return 1; /* LCOV_EXCL_STOP */ }