-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] Fix newline after program with exit code 130 #386
Conversation
ec9b0f3
to
176c335
Compare
176c335
to
b2890be
Compare
Something is wrong with the CI shell scripts... |
Bash also seems to put it to stderr. Tested with: Terminal 1 (stdout): `tty` -> `/dev/pts/*` Terminal 2 (stderr): `bash >/dev/pts/*`
`./return_130 || echo 123` did not print `123`.
It could happen bc of a certain order of including headers that `_DEFAULT_SOURCE` was redefined.
b2890be
to
f7e72c1
Compare
866019e
to
11aa0a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe need to check tomorrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get the point why remove the sig checking
And I feel sometimes you over norminattee make the code confusing me. |
I'm happy to do a code review on campus whenever you have time! |
Fixes programs with exit code 130 causing a newline.
Fixes minishell running in minishell printing too many newlines after SIGINT + exit.
Fixes nested subshells printing too many newlines:
( ( (cat) ) )
Fixes
cat | ./segfault
behavior:Segmentation fault
only gets printed at end of pipeline.This also fixes the exit code affecting
&&
/||
:./return_130 || echo 123
did not print123
.Resolves [BUG] minishell running in minishell prints too many newlines after exiting, also in subshells #257
Known issues
(sleep 3 && ./segfault)
should not printSegmentation fault
(which is super weird bc(./segfault)
does printSegmentation fault
!