How to pass SIGINT to child process with Python subprocess.Popen() using shell = true
I am currently trying to write (Python 2.7.3) kind of a wrapper for GDB, which will allow me to dynamically switch from scripted input to interactive communication with GDB. So far I use self.process = subprocess.Popen(["gdb vuln"], stdin = subprocess.PIPE, shell = True) to start gdb within my script. ( vuln is the binary I want to examine) Since a key feature of gdb is to pause the execution of the attached process and allow the user to inspect registers and memory on receiving SIGINT (STRG+C) I do need some way to pass a SIGINT signal to it. Neither self.process.send_signal(signal.SIGINT)