From: Gabriel Corona Date: Mon, 24 Aug 2015 08:46:44 +0000 (+0200) Subject: tesh: Let a grace period of 1s for the child process to die properly X-Git-Tag: v3_12~300^2~10 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/47d0ea909d927182fc120c9401cd61eeab531972?ds=sidebyside tesh: Let a grace period of 1s for the child process to die properly --- diff --git a/tools/tesh/tesh.pl b/tools/tesh/tesh.pl index 4bbeb20fca..6acee9a38d 100755 --- a/tools/tesh/tesh.pl +++ b/tools/tesh/tesh.pl @@ -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; }