Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
9
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Ole Tange
tangetools
Commits
4c0e5927
Commit
4c0e5927
authored
Mar 05, 2019
by
Ole Tange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tracefile: Output from cmd on stdout can mess up output from strace.
parent
cbaa61fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
tracefile/tracefile
tracefile/tracefile
+2
-1
No files found.
tracefile/tracefile
View file @
4c0e5927
...
...
@@ -256,7 +256,8 @@ my @cmd = shell_quote(@ARGV);
my
$dir
=
"
.
";
my
$pid
=
$
opt::
pid
?
"
-p
$opt
::pid
"
:
"";
open
(
IN
,
"
-|
",
"
strace -ff
$pid
-e trace=file
@cmd
2>&1
")
||
die
;
# BUG: If command gives output on stderr that can confuse the strace output
open
(
IN
,
"
-|
",
"
strace -ff
$pid
-e trace=file
@cmd
2>&1 >/dev/null
")
||
die
;
while
(
<
IN
>
)
{
if
(
/chdir."(([^\\"]|\\[\\"nt])*)".\s*=\s*0/
)
{
$dir
=
$
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment