Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vladimír Štill
ciutils
Commits
36421bff
Verified
Commit
36421bff
authored
Aug 12, 2020
by
Vladimír Štill
Browse files
makefilter: Capture stderr too
parent
132d6648
Changes
1
Show whitespace changes
Inline
Side-by-side
makefilter
View file @
36421bff
...
...
@@ -3,11 +3,12 @@
use
warnings
;
use
strict
;
use
Term::
ANSIColor
;
use
IPC::
Open3
;
use
v5
.16
;
$|
++
;
open
(
my
$full
,
"
>
",
"
make-full.log
");
open
(
my
$make
,
"
-|
"
,
@ARGV
);
my
$pid
=
open3
('
<&STDIN
',
my
$make
,
undef
,
@ARGV
);
my
$cut
=
0
;
while
(
<
$make
>
)
{
...
...
@@ -19,9 +20,12 @@ while (<$make>) {
say
"
[[[log cut by makefilter, full log in make-full.log]]]
";
}
}
if
(
not
close
(
$make
))
{
my
$exit
=
$?
>>
8
;
my
$sig
=
$?
&
0xff
;
die
"
Error closing handle to make: $!
"
if
$!
!=
0
;
exit
$exit
+
$sig
;
waitpid
(
$pid
,
0
);
my
$sig
=
$?
&
0xff
;
if
(
$sig
)
{
say
colored
("
Killed by signal
$sig
",
'
bright_red
');
exit
$sig
;
}
my
$exit
=
$?
>>
8
;
exit
$exit
;
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment