aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2006-05-01 10:35:12 +0000
committerFlorent Villard <warly@mandriva.com>2006-05-01 10:35:12 +0000
commit54995d33e25b1bb28e6c006fe21719bee0e4e5d5 (patch)
treeaf70369007d85f8c1d688ca28d9363c3f3be2b80
parentfb07450658d9a95caa5e980c0490adc22984a293 (diff)
downloadiurt-54995d33e25b1bb28e6c006fe21719bee0e4e5d5.tar
iurt-54995d33e25b1bb28e6c006fe21719bee0e4e5d5.tar.gz
iurt-54995d33e25b1bb28e6c006fe21719bee0e4e5d5.tar.bz2
iurt-54995d33e25b1bb28e6c006fe21719bee0e4e5d5.tar.xz
iurt-54995d33e25b1bb28e6c006fe21719bee0e4e5d5.zip
Try to kill more agressively processes launched if the forked command is stopped
-rwxr-xr-xiurt24
1 files changed, 3 insertions, 1 deletions
diff --git a/iurt2 b/iurt2
index ff79be5..d2e5353 100755
--- a/iurt2
+++ b/iurt2
@@ -990,7 +990,9 @@ sub perform_command {
$opt{callback}(\%opt, $output) and return
}
if ($kill) {
- $output = "Command has been killed after $opt{timeout} seconds: $command\n$output"
+ $output = "Command has been killed after $opt{timeout} seconds: $command\n$output";
+ my ($cmd_to_kill) = $command =~ /sudo(?: chroot \S+)? (.*)/;
+ clean_process($cmd_to_kill, $run{verbose})
} elsif ($pipe) {
$output = "Command receives a broken pipe: $command\n$output";
sendmail($config->{admin}, '' , "$opt{hash} on $run->{my_arch} for $run->{media}: broken pipe", "$output", 0, 0, $opt{debug_mail});