I have a subprocess opened with Popen. When I press CTRL+C in the main program, my subprocess shutdowns just fine with the handler I registerd for SIGINT and SIGTERM. However: When I try to manually send SIGINT, it raises a signal not supported error. Sending SIGTERM kills my subprocess instantly. When I do handle.terminate(), my subprocess just dies, too.
I need it to shutdown gracefully. I searched and searched and couldnt find anything which would replicate the behavior from pressing CTRL+C.
Is there anything I can do, to achieve what I want?
As stated in the title, i am using windows (7 64bit, python 3.4.5)
// EDIT:
I also tried sending CTRL_C_EVENT which is possible but cant be registered as signal handler in the subprocess