[lintian] 02/02: lintian: On errors, do not complain about unreaped children
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 8a5b81f7a07a3d999bda2071587f2cec8263df78
Author: Niels Thykier <niels@thykier.net>
Date: Wed Jul 22 09:14:48 2015 +0200
lintian: On errors, do not complain about unreaped children
On errors (or just a plain old ^C "interrupt"), checks/manpages can
now leave child processes behind. There is no reason to flag this as
an unexpected error.
Signed-off-by: Niels Thykier <niels@thykier.net>
---
frontend/lintian | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/frontend/lintian b/frontend/lintian
index 1d38517..fbfa2f9 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -863,10 +863,20 @@ foreach my $gname (sort $pool->get_group_names()) {
$success = 0;
}
$group->clear_cache;
- # Double check that no processes are running; hopefully
- # it will catch regressions like 3bbcc3b earlier.
- fail('Unreaped processes after running checks!?')
- if waitpid(-1, WNOHANG) != -1;
+ if ($exit_code != 2) {
+ # Double check that no processes are running;
+ # hopefully it will catch regressions like 3bbcc3b
+ # earlier.
+ $exit_code = 2;
+ fail('Unreaped processes after running checks!?')
+ if waitpid(-1, WNOHANG) != -1;
+ } else {
+ # If we are interrupted in (e.g.) checks/manpages, it
+ # tends to leave processes behind. No reason to flag
+ # an error for that - but we still try to reap the
+ # children if they are now done.
+ 1 while waitpid(-1, WNOHANG) > 0;
+ }
}
};
my $total_tres = $format_timer_result->($total_raw_res);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: