rask24 / minishell

3 stars 0 forks source link

Builtins `exit` in subshell #87

Closed rask24 closed 2 weeks ago

rask24 commented 1 month ago

Consider another error case: too many arguments

bash-5.2$ cd src include tests
bash: cd: too many arguments
bash-5.2$ echo $?
1
rask24 commented 3 weeks ago

Examples

bash-5.2$ (exit 1 1)
bash: exit: too many arguments
bash-5.2$ exit 1 1
exit
bash: exit: too many arguments
bash-5.2$ exit | exit
bash-5.2$ echo $?
0
bash-5.2$ exit 10 | exit 2
bash-5.2$ echo $?
2
rask24 commented 2 weeks ago

In pipeline

if conf is NULL or not

rask24 commented 2 weeks ago

exit message

Only parent minishell process displays exit message.