Sometimes, some time after I've backgrounded a process with bg
in bash, when I press Enter in the same shell to redisplay the prompt (just to check that I'm still in bash when some output from the background process has been displayed), the background process seems to stop spontaneously.
If I do bg
again the same problem recurs.
The only way to fix it seems to be fg
.
Why does this happen?