提交 2979076f 编写于 作者: M Mike Frysinger 提交者: Michal Marek

headers_install: check exit status of unifdef

If unifdef fails for any reason (like segfaulting), we should be aborting
the install steps.  So check its exit status in this unlikely scenario.
Reported-by: NDiego Elio Pettenò <flameeyes@gentoo.org>
Signed-off-by: NMike Frysinger <vapier@gentoo.org>
Signed-off-by: NMichal Marek <mmarek@suse.cz>
上级 43f901fb
......@@ -45,6 +45,13 @@ foreach my $file (@files) {
close $in;
system $unifdef . " $tmpfile > $installdir/$file";
# unifdef will exit 0 on success, and will exit 1 when the
# file was processed successfully but no changes were made,
# so abort only when it's higher than that.
my $e = $? >> 8;
if ($e > 1) {
die "$tmpfile: $!\n";
}
unlink $tmpfile;
}
exit 0;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册