Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tesh: Let a grace period of 1s for the child process to die properly
[simgrid.git] / tools / tesh / tesh.pl
index 4bbeb20..6acee9a 100755 (executable)
@@ -280,6 +280,8 @@ sub exec_cmd {
     die "fork() failed: $!" unless defined $forked;
     if ( $forked == 0 ) { # child
       sleep $time_to_wait;
+      kill(SIGTERM, $cmd{'pid'});
+      sleep 1;
       kill(SIGKILL, $cmd{'pid'});
       exit $time_to_wait;
     }