When I do
( sleep 1; read x ; echo x=$x; echo done ) &
then with the default terminal settings, the job gets stopped by SIGTTIN
.
If I do
( ( sleep 1; read x ; echo x=$x; echo done ) & )
the read
syscall inside read
gets EOF (returns with 0)` and no stopping by SITTIN happens.
What is the explanation for these behavior