Fix unit tests hanging when there's an exception in a sandbox run

Fixes #298 (closed)

Rather than having to go through extra effort to reproduce and debug when this happens, fixing the hang lets us see the cause during automated tests.

It's possible that it would be neater to make buildstream._signals.terminator call the cleanup function as well during __exit__. It would reduce the scope of the race condition between removing the signal handler and calling the cleanup manually, but that just moves it to inside buildstream._signals.terminator, so a more complicated solution would be required.

Merge request reports

Loading