From ce1d3a1369c313c01a0c6545f80ecdb4936487b5 Mon Sep 17 00:00:00 2001 From: Vysheng Date: Tue, 23 Sep 2014 18:39:28 +0400 Subject: [PATCH] Fixed readline_disable mode --- interface.c | 1 + loop.c | 1 + main.c | 11 +++++++++++ 3 files changed, 13 insertions(+) diff --git a/interface.c b/interface.c index 17cafd3..4593ac0 100644 --- a/interface.c +++ b/interface.c @@ -970,6 +970,7 @@ extern char *lua_file; extern struct event *term_ev; void do_clear (int arg_num, struct arg args[], struct in_ev *ev) { + logprintf ("Do_clear\n"); tgl_free_all (); free (default_username); free (config_filename); diff --git a/loop.c b/loop.c index d4c8a2e..1362952 100644 --- a/loop.c +++ b/loop.c @@ -141,6 +141,7 @@ static void stdin_read_callback_all (int arg, short what, struct event *self) { break; } } + break; } } } diff --git a/main.c b/main.c index 8c140ad..ff57ec1 100644 --- a/main.c +++ b/main.c @@ -34,6 +34,14 @@ #else #include #endif +#ifdef EVENT_V2 +#include +#include +#include +#else +#include +#include "event-old.h" +#endif #include #include @@ -676,6 +684,9 @@ void sig_term_handler (int signum __attribute__ ((unused))) { if (write (1, "SIGTERM/SIGINT received\n", 25) < 0) { // Sad thing } + if (tgl_state.ev_base) { + event_base_loopbreak(tgl_state.ev_base); + } sigterm_cnt ++; }