shell_script()
+ reset "rl_event_hook" to NULL after here_doc() + split init.c in multiple files + submodule minishell_tests
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/04 05:59:26 by lperrey #+# #+# */
|
||||
/* Updated: 2021/12/01 14:45:04 by lperrey ### ########.fr */
|
||||
/* Updated: 2021/12/18 03:24:54 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -21,8 +21,7 @@ void shell_loop(t_all *c)
|
||||
line_input = NULL;
|
||||
while (1)
|
||||
{
|
||||
if (line_input)
|
||||
free(line_input);
|
||||
free(line_input);
|
||||
line_input = read_input(c->prompt, c);
|
||||
if (line_input && *line_input)
|
||||
{
|
||||
@@ -48,6 +47,7 @@ static char *read_input(char *prompt, t_all *c)
|
||||
ft_bzero(&signal_behaviour, sizeof signal_behaviour);
|
||||
signal_behaviour.sa_handler = sigint_handler_interactive;
|
||||
sigaction(SIGINT, &signal_behaviour, NULL);
|
||||
rl_event_hook = NULL;
|
||||
line_input = readline(prompt);
|
||||
signal_behaviour.sa_handler = SIG_IGN;
|
||||
sigaction(SIGINT, &signal_behaviour, NULL);
|
||||
|
||||
Reference in New Issue
Block a user