A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replace signal number by its name, for better portability
[simgrid.git]
/
buildtools
/
Cmake
/
Scripts
/
tesh.pl
diff --git
a/buildtools/Cmake/Scripts/tesh.pl
b/buildtools/Cmake/Scripts/tesh.pl
index
e2c9723
..
ca4d0b7
100755
(executable)
--- a/
buildtools/Cmake/Scripts/tesh.pl
+++ b/
buildtools/Cmake/Scripts/tesh.pl
@@
-258,7
+258,7
@@
sub exec_cmd {
die "fork() failed: $!" unless defined $forked;
if ( $forked == 0 ) { # child
sleep $time_to_wait;
die "fork() failed: $!" unless defined $forked;
if ( $forked == 0 ) { # child
sleep $time_to_wait;
- kill(
9
, $pid);
+ kill(
SIGKILL
, $pid);
exit $time_to_wait;
}
}
exit $time_to_wait;
}
}
@@
-270,7
+270,7
@@
sub exec_cmd {
$got =~ s/\r//g;
$got =~ s/^( )*//g;
chomp $got;
$got =~ s/\r//g;
$got =~ s/^( )*//g;
chomp $got;
- $got=trim($got);
+
$got=trim($got);
if( $got ne ""){
if (!($enable_coverage and $got=~ /^profiling:/)){
push @got, "$got";
if( $got ne ""){
if (!($enable_coverage and $got=~ /^profiling:/)){
push @got, "$got";
@@
-406,7
+406,7
@@
LINE: while (not $finished and not $error) {
}
# Push delayed commands on empty lines
}
# Push delayed commands on empty lines
- unless ($line =~ m/^(.)
\s*
(.*)$/) {
+ unless ($line =~ m/^(.)
.
(.*)$/) {
if (defined($cmd{'cmd'})) {
exec_cmd(\%cmd);
%cmd = ();
if (defined($cmd{'cmd'})) {
exec_cmd(\%cmd);
%cmd = ();
@@
-531,6
+531,11
@@
LINE: while (not $finished and not $error) {
} else {
die "[TESH/CRITICAL] parse error: $line\n";
}
} else {
die "[TESH/CRITICAL] parse error: $line\n";
}
+ if($forked){
+ kill(SIGKILL, $forked);
+ $timeout=0;
+ }
+
}
}
@@
-543,7
+548,7
@@
if (defined($cmd{'cmd'})) {
if($forked){
if($forked){
- kill(
9
, $forked);
+ kill(
SIGKILL
, $forked);
$timeout=0;
}
$timeout=0;
}