It's useful for valgrind in DEBUG mode, but makes it more difficult to
terminate tlsproxy (Ctrl-C no longer works) in case of a
stalled/unfinished connection.
static SEM *ringbuffer_lock; /* Read lock. */
static SEM *ringbuffer_lock; /* Read lock. */
static void sigint_handler(int signal);
static void sigint_handler(int signal);
static void parse_arguments(int argc, char **argv);
static void print_usage(const char *argv);
static void parse_arguments(int argc, char **argv);
static void print_usage(const char *argv);
}
/* Setup our SIGINT signal handler which allows a "normal" termination of
}
/* Setup our SIGINT signal handler which allows a "normal" termination of
+ * the server in DEBUG mode. */
sigemptyset(&action.sa_mask);
sigemptyset(&action.sa_mask);
- action.sa_handler = sigint_handler;
+#ifdef DEBUG
+ action.sa_handler = sigint_handler;
sigaction(SIGINT, &action, NULL);
sigaction(SIGINT, &action, NULL);
/* Ignore SIGPIPEs. */
action.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &action, NULL);
/* Ignore SIGPIPEs. */
action.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &action, NULL);
static void sigint_handler(int signal_number) {
(void)signal_number;
done = 1;
}
static void sigint_handler(int signal_number) {
(void)signal_number;
done = 1;
}
static void parse_arguments(int argc, char **argv) {
int option;
static void parse_arguments(int argc, char **argv) {
int option;