Hi Godmar!

> For instance:
> 
> gback@lat2022:~$ sleep 10 && echo yes
> ^Z
> [1]+  Stopped                 sleep 10
> gback@lat2022:~$ fg
> sleep 10
> gback@lat2022:~$
>
> ...
> 
> What's the rationale for bash's behavior in this case and is this something
> that should be changed?

I assume this is because sleep "exits" with an exit status of 148 
(=128+SIGTSTP) when it is stopped. If you replace the && with an ;, you get 
"yes" immediately after pressing ^Z.

Best regards

Martin

Reply via email to