Fixed readline_disable mode
This commit is contained in:
parent
df06d0858b
commit
ce1d3a1369
@ -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);
|
||||
|
1
loop.c
1
loop.c
@ -141,6 +141,7 @@ static void stdin_read_callback_all (int arg, short what, struct event *self) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
11
main.c
11
main.c
@ -34,6 +34,14 @@
|
||||
#else
|
||||
#include <editline/readline.h>
|
||||
#endif
|
||||
#ifdef EVENT_V2
|
||||
#include <event2/event.h>
|
||||
#include <event2/bufferevent.h>
|
||||
#include <event2/buffer.h>
|
||||
#else
|
||||
#include <event.h>
|
||||
#include "event-old.h"
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/socket.h>
|
||||
@ -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 ++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user