Notes (assuming Linux): (1) It's the terminal driver that intercepts
^C
or ^Z
character and sends SIGINT
or SIGTSTP
. The terminal may be configured not to do this, so it's not necessarily that the process ignores anything, respective signal sent with kill
may still work. (2) The signal (from keyboard or from kill
) may work but if the parent does not properly react to SIGCHLD
then you may think the child is still there silently doing something. (3) You wrote "the foreground process" (singular). SIGINT
or SIGTSTP
from keyboard goes to the foreground process group.