Commit 2979076f authored by Mike Frysinger's avatar Mike Frysinger Committed by 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: default avatarDiego Elio Pettenò <flameeyes@gentoo.org>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment