minishell icon indicating copy to clipboard operation
minishell copied to clipboard

[BUG] minishell running in minishell prints too many newlines after exiting, also in subshells

Open itislu opened this issue 2 years ago • 1 comments

This happens when first pressing Ctrl+C and then exiting. It's because when we print a newline depends on the exit code.

With a program that returns 130 we also print a newline. This also applies to subshells. The more nested subshells there are, the more newlines get printed.

It is now very clear that signals should be handled by the main shell process, not from the child processes.

itislu avatar Mar 20 '24 01:03 itislu

There's also an additional newline when preemptively ending a heredoc with CTRL+D and then CTRL+C.

itislu avatar Aug 20 '24 22:08 itislu