Closed andreaulicna closed 9 months ago
Added a new signal handler handle_sigint_hanging_command, using SIGUSR2, for a case when a hanging command gets interrupted by SIGINT
handle_sigint_hanging_command
Example commands
cat sort
Child flow:
SIGUSR2 is registered and makes the child exit with 130
SIGINT is ignored
Parent flow:
SIGUSR2 is ignored
SIGINT is registered and then it:
\n
wait_for_pipeline
Other notes
main.c
print.c
debug
free.c
free_pipe_child
free_pipe.c
old_cmd != NULL
content->cmd[0] == NULL
135
Added a new signal handler
handle_sigint_hanging_command
, using SIGUSR2, for a case when a hanging command gets interrupted by SIGINTExample commands
Child flow:
SIGUSR2 is registered and makes the child exit with 130
SIGINT is ignored
Parent flow:
SIGUSR2 is ignored
SIGINT is registered and then it:
\n
wait_for_pipeline
and the exit_status set to 130 if needed133
Other notes
main.c
into the main folderprint.c
from compilation but kept the file indebug
directory to always have access to the debugging minishell_loop and print functionsfree.c
to separate actual freeing and setting variables that are used repeatedly to NULL before a new minishell_loopfree_pipe_child
infree_pipe.c
to get rid of the last bits of still reachable leaks (for multiple pipes)old_cmd != NULL
) and exec (content->cmd[0] == NULL
)