I used to think that only if a shell supports job control, can it has the concept of "foreground" and "background" processes (group). But I read a paragraph indicating that's not true.
From APUE § 10.3 :
One specific example of this signal status behavior is how an interactive shell treats the interrupt and quit signals for a background process. With a shell that doesn’t support job control, when we execute a process in the background, as in
cc main.c &
the shell automatically sets the disposition of the interrupt and quit signals in the background process to be ignored. This is done so that if we type the interrupt character, it doesn’t affect the background process. If this weren’t done and we typed the interrupt character, it would terminate not only the foreground process, but also all the background processes.
Btw, given the example above,
If this weren’t done and we typed the interrupt character, it would terminate not only the foreground process, but also all the background processes.
It also seems to indicate that both the foreground processes and background processes can attach the same terminal at the same time. Is it true? Because I always think that the terminal can only attach to the foreground proccesses (group).