diff options
Diffstat (limited to 'src/m_loop.c')
-rw-r--r-- | src/m_loop.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/m_loop.c b/src/m_loop.c index 03ce8e2..6444c1b 100644 --- a/src/m_loop.c +++ b/src/m_loop.c @@ -14,6 +14,7 @@ #include <stdlib.h> #include <fcntl.h> #include <unistd.h> +#include <signal.h> #ifdef __linux__ # include <linux/limits.h> #else @@ -21,6 +22,7 @@ #endif #include "c_init.h" +#include "c_ctrls.h" #include "d_define.h" #include "e_line.h" #include "m_loop_multis.h" @@ -136,6 +138,9 @@ unsigned char m_loop(int fd, t_msh *msh) gnl = 1; msh->curr_hist_ptr = hist; + c_get_msh(1, msh); + signal(SIGINT, c_signal_int); + signal(SIGQUIT, c_signal_ign); while (gnl > 0) { gnl = (fd == STDIN_FILENO) ? c_gnl(fd, &line, 1, msh) : |