Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally disabling signal handling #178

Open
lofcek opened this issue May 20, 2020 · 1 comment
Open

Optionally disabling signal handling #178

lofcek opened this issue May 20, 2020 · 1 comment

Comments

@lofcek
Copy link

lofcek commented May 20, 2020

Is there any way how not to handle signals on Linux? It looks that Unittest++ always try to suppress many signals, that appear during running the test. It is not always what we want, especially for SIGSEGV.

I have one teoretical problem - that if some data in the memory are corrupted, next test will be running as undefined behavior.

My practical problem is deadlock. This was caused by crash in test. My test started with a lock a mutex to singleton, after that it crashed (access to null pointer). After that framework tried to fix the signal. Skipped all the destructor (including ~lock_guard) and next test tried to lock the same mutex again.

@pjohnmeyer
Copy link
Member

@lofcek I don't believe there is an easy way, presently, to disable UnitTest++'s signal trapping behavior.

If you think it would have value, I would welcome a pull request, but I'd like to see some discussion hear about how folks would implement it first.

@pjohnmeyer pjohnmeyer changed the title Signal handling Optionally disabling signal handling May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants