Pass Ctrl+C signal from ctest to test programs.

My situation is exactly like

I want to run some clean up when signals like SIGTERM are received. When I run the test manually and press Ctrl+C, the signal is handled correctly and cleans up as expected. With ctest, this is not the case and it seems ctest is not sending the signals to the test program.

Although this is not exactly what you want, I wonder if the signaling enabled recently could be further adapted to your needs.

Thank you!

Yeah it’s close, but it can only be used when the test program times out, so not sure it can be applied in my case, since this one involves catching signals sent to ctest.

Also, looks like it’s something that has bothered a couple of people before now: