fix(heredoc): Now displaying ^C again in heredoc when SIGINT caught

This commit is contained in:
Jérôme Guélen 2025-05-05 12:10:15 +02:00
parent b7686df5a8
commit 7cd8d981e2
No known key found for this signature in database
5 changed files with 27 additions and 7 deletions

View file

@ -6,7 +6,7 @@
/* By: jguelen <jguelen@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/02 12:16:37 by kcolin #+# #+# */
/* Updated: 2025/05/02 13:01:42 by jguelen ### ########.fr */
/* Updated: 2025/05/05 12:03:56 by jguelen ### ########.fr */
/* */
/* ************************************************************************** */
@ -57,7 +57,7 @@ int set_here_doc_mode_sig_handling(void)
ft_bzero(&sig_act, sizeof(struct sigaction));
if (sigemptyset(&sig_act.sa_mask) == -1)
return (-1);
sig_act.sa_sigaction = &sig_cmd;
sig_act.sa_sigaction = &sig_heredoc;
sig_act.sa_flags |= SA_SIGINFO;
if (sigaction(SIGINT, &sig_act, NULL) == -1)
return (-1);