Skip to content
Snippets Groups Projects
Commit 46a7ae80 authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

fixed --no-redirect option to use stdout instead of thanos.log

Former-commit-id: 4de52f8a60f794f63b196e231479365f53eb975a
parent 402ee037
No related branches found
No related tags found
No related merge requests found
......@@ -273,6 +273,11 @@ int ThanosPlugin_t::runPlugin()
dup2(fileno(logfile), STDOUT_FILENO);
dup2(fileno(logfile), STDERR_FILENO);
}
else
{
dup2(new_stdout_fd, STDOUT_FILENO);
dup2(new_stderr_fd, STDERR_FILENO);
}
}
......@@ -296,8 +301,8 @@ int ThanosPlugin_t::runPlugin()
cout<< "#ATTRIBUTE step_exitcode="<<dec<<step_result<<endl;
dup2(new_stdout_fd, STDOUT_FILENO);
dup2(new_stderr_fd, STDERR_FILENO);
dup2(thanos_log_fd, STDOUT_FILENO);
dup2(thanos_log_fd, STDERR_FILENO);
if(logfile)
fclose(logfile);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment