title: How does Ctrl-C terminate a child process?
body: <p>I am trying to understand how <kbd>CTRL</kbd>+<kbd>C</kbd> terminates a child but not a parent process. I see this behavior in some script shells like <code>bash</code> where you can start some long-running process and then terminate it by entering <kbd>CTRL</kbd>-<kbd>C</kbd> and the control returns to the shell.</p>
  
  <p>Could you explain how does it work and in particular why isn't the parent (shell) process terminated?</p>
  
  <p>Does the shell have to do some special handling of <kbd>CTRL</kbd>+<kbd>C</kbd> event and if yes what exactly does it do?</p>