diff --git a/test/m_epics_ca_test.cxx b/test/m_epics_ca_test.cxx index 2e135ae..d5d4008 100644 --- a/test/m_epics_ca_test.cxx +++ b/test/m_epics_ca_test.cxx @@ -44,13 +44,14 @@ class IocProcess { _pid = fork(); if (_pid == 0) { + int devnull = open("/dev/null", O_RDWR); - // Hide IOC output - int devnull = open("/dev/null", O_WRONLY); + dup2(devnull, STDIN_FILENO); dup2(devnull, STDOUT_FILENO); + dup2(devnull, STDERR_FILENO); + close(devnull); - // Start the IOC from the child process execl(path.c_str(), path.c_str(), (char *)NULL); perror("execl failed"); _exit(1);