This commit is contained in:
2024-03-25 20:41:05 +01:00
parent 50dd393b36
commit c5b6f8f53e
4 changed files with 43 additions and 17 deletions

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/24 17:44:32 by marde-vr #+# #+# */
/* Updated: 2024/03/25 19:14:46 by tomoron ### ########.fr */
/* Updated: 2024/03/25 20:38:21 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -85,7 +85,6 @@ void get_here_doc_input(t_msh *msh, char *eof)
line = NULL;
signal(SIGINT, signal_handler_here_doc);
signal(SIGQUIT, signal_handler_here_doc);
while (1)
{
free(line);
@ -131,10 +130,10 @@ void handle_here_doc(t_msh *msh, char *eof)
else
{
signal(SIGINT, signal_handler_command);
signal(SIGQUIT, signal_handler_command);
signal(SIGQUIT, signal_handler_here_doc);
waitpid(pid, &status , 0);
signal(SIGINT, signal_handler_interactive);
signal(SIGQUIT, signal_handler_interactive);
signal(SIGQUIT, signal_handler_interactive);
close(msh->in_fd);
if(WIFEXITED(status) && WEXITSTATUS(status))
unlink(here_doc_file);