title: Python: How to prevent subprocesses from receiving CTRL-C / Control-C / SIGINT
body: <p>I am currently working on a wrapper for a dedicated server running in the shell. The wrapper spawns the server process via subprocess and observes and reacts to its output.</p>
  
  <p>The dedicated server must be explicitly given a command to shut down gracefully. Thus, CTRL-C must not reach the server process.</p>
  
  <p>If I capture the KeyboardInterrupt exception or overwrite the SIGINT-handler in python, the server process still receives the CTRL-C and stops immediately.</p>
  
  <p>So my question is:
  How to prevent subprocesses from receiving CTRL-C / Control-C / SIGINT?</p>