Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
Zipr Toolchain
Commits
402ee037
Commit
402ee037
authored
6 years ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
thanos redirect update
Former-commit-id: 10cf476e604c597d2e9f9554a2bc140adf08e45d
parent
eaab5e0a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/thanos/thanos.cpp
+6
-4
6 additions, 4 deletions
tools/thanos/thanos.cpp
with
6 additions
and
4 deletions
tools/thanos/thanos.cpp
+
6
−
4
View file @
402ee037
...
...
@@ -26,6 +26,8 @@ ostream *real_cout;
ostream
*
real_cerr
;
string
thanos_path
;
bool
redirect_opt
=
true
;
int
new_stdout_fd
=
1
;
int
new_stderr_fd
=
2
;
class
ThanosPlugin_t
{
...
...
@@ -74,8 +76,8 @@ int main(int argc, char* argv[])
{
thanos_path
=
argv
[
0
];
auto
new_stdout_fd
=
dup
(
STDOUT_FILENO
);
auto
new_stderr_fd
=
dup
(
STDERR_FILENO
);
new_stdout_fd
=
dup
(
STDOUT_FILENO
);
new_stderr_fd
=
dup
(
STDERR_FILENO
);
__gnu_cxx
::
stdio_filebuf
<
char
>
stdout_filebuf
(
new_stdout_fd
,
ios
::
out
);
__gnu_cxx
::
stdio_filebuf
<
char
>
stderr_filebuf
(
new_stderr_fd
,
ios
::
out
);
...
...
@@ -294,8 +296,8 @@ int ThanosPlugin_t::runPlugin()
cout
<<
"#ATTRIBUTE step_exitcode="
<<
dec
<<
step_result
<<
endl
;
dup2
(
thanos_log
_fd
,
STDOUT_FILENO
);
dup2
(
thanos_log
_fd
,
STDERR_FILENO
);
dup2
(
new_stdout
_fd
,
STDOUT_FILENO
);
dup2
(
new_stderr
_fd
,
STDERR_FILENO
);
if
(
logfile
)
fclose
(
logfile
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment