Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
replace signal number by its name, for better portability
authorAugustin Degomme <degomme@idpann.imag.fr>
Thu, 10 Oct 2013 09:41:15 +0000 (11:41 +0200)
committerAugustin Degomme <degomme@idpann.imag.fr>
Thu, 10 Oct 2013 13:02:13 +0000 (15:02 +0200)
buildtools/Cmake/Scripts/tesh.pl

index d74a6d5..ca4d0b7 100755 (executable)
@@ -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;
     }
   }
@@ -532,7 +532,7 @@ LINE: while (not $finished and not $error) {
     die "[TESH/CRITICAL] parse error: $line\n";
   }
   if($forked){
     die "[TESH/CRITICAL] parse error: $line\n";
   }
   if($forked){
-   kill(9, $forked);
+   kill(SIGKILL, $forked);
    $timeout=0;
   }
 
    $timeout=0;
   }
 
@@ -548,7 +548,7 @@ if (defined($cmd{'cmd'})) {
 
 
 if($forked){
 
 
 if($forked){
-   kill(9, $forked);
+   kill(SIGKILL, $forked);
    $timeout=0;
 }
 
    $timeout=0;
 }