1

I'm using Catch2 for testing in C++. My test case forks a child process and at some point the parent process sends a kill(pid, SIGTERM) to it to clean it up.

However, I get the following error from Catch2.

FAILED:
due to a fatal error condition:
  SIGTERM - Termination request signal

Of course I'm deliberately making this sys call so I don't consider it a test fail. How can I get Catch2 to ignore this failure condition?

Thanks!

user11909399
  • 49
  • 1
  • 7

1 Answers1

1

You can disable POSIX signal handling by defining CATCH_CONFIG_NO_POSIX_SIGNALS during compilation.

Xarn
  • 3,460
  • 1
  • 21
  • 43