import signal

def preexec_function():
    signal.signal(signal.SIGINT, signal.SIG_IGN)
my_process = subprocess.Popen(['my_executable'], preexec_fn=preexec_function)
Python: How to prevent subprocesses from receiving CTRL-C / Control-C / SIGINT