l'execution marche (un petit peu) ( je crois)

This commit is contained in:
2024-04-03 17:47:21 +02:00
parent 4c9941a5d6
commit babcc2ebdf
21 changed files with 190 additions and 110 deletions

8
srcs/here_doc.c Normal file → Executable file
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/04/02 17:04:44 by tomoron ### ########.fr */
/* Updated: 2024/04/03 17:20:55 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -40,7 +40,7 @@ void here_doc_child(t_msh *msh, char *eof, char *here_doc_file)
{
here_doc_variables(1, 0, msh);
here_doc_variables(1, 1, here_doc_file);
signal(SIGINT, signal_handler_here_doc);
//signal(SIGINT, signal_handler_here_doc);
get_here_doc_input(msh, eof);
close(msh->in_fd);
free(here_doc_file);
@ -51,10 +51,10 @@ void here_doc_signal(t_msh *msh, int child_pid, char *here_doc_file)
{
int status;
signal(SIGINT, signal_handler_command);
//signal(SIGINT, signal_handler_command);
signal(SIGQUIT, signal_handler_here_doc);
waitpid(child_pid, &status, 0);
signal(SIGINT, signal_handler_interactive);
//signal(SIGINT, signal_handler_interactive);
signal(SIGQUIT, signal_handler_interactive);
close(msh->in_fd);
if (WIFEXITED(status) && WEXITSTATUS(status))