CTest leaves a file descriptor open before executing tests

I have a problem with observing an extra file descriptor during my tests execution via ctest.

I have described my issue here on StackOverflow:

I have two questions (copied from my StackOverflow issue):

  1. Is it a bug or a feature? For me it seems to be a bug since I have no idea for what purpose this extra file descriptor may be left open before execution of my test, but I’m quite new to C++ infrastructure and may miss something.
  2. Is there any way to overcome the problem without changing the test code, i.e. by manipulating ctest flags?