@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user