python sigint and ctrl c have different effects

1
Hello, I need to run an executable made in c, this executable executes operations on a board and writes to a file, the problem is that the write event occurs when the program receives a ctrl + c. I tried to send a sigint (as far as I know they are equivalent) but this caused the execution to end immediately without writing to the file. my code:

def run(tempo):
proc = subprocess.Popen(["nke/NKE0.7e/terminal64","--plot"], shell=False)
time.sleep(tempo)
proc.send_signal(signal.SIGTERM)

below the output generated by sigint and the output generated by ctrl + c imagewithsigint image with ctrl + c as you can see in the second the output is different, at first the execution simply ends

    
asked by anonymous 06.07.2018 / 01:25

0 answers