diff --git a/test/src/module/common/errorTest.c b/test/src/module/common/errorTest.c index e5e25351d..64eb0e95e 100644 --- a/test/src/module/common/errorTest.c +++ b/test/src/module/common/errorTest.c @@ -416,7 +416,7 @@ testRun(void) HRN_FORK_CHILD_BEGIN(.expectedExitStatus = UnhandledError.code) { // Redirect stderr to stdout (we do not care about the output here since coverage will tell us we hit the code) - stderr = stdout; + dup2(fileno(stdout), fileno(stderr)); THROW(TestChildError, "does not get caught!"); }