Define pgrep and print the processes to be killed
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 10 Oct 2018 20:08:42 +0000 (16:08 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 18 Oct 2018 19:26:48 +0000 (15:26 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
scripts/lttng-tools/build.sh

index 36c87b0f9d9d5dcf411c4ff0c9825d077247e511..052eb8d54a9f27632527f56751cdef6101faec29 100755 (executable)
@@ -102,6 +102,8 @@ UST_JAVA="$WORKSPACE/deps/lttng-ust/build/share/java/"
 BABEL_LIBS="$WORKSPACE/deps/babeltrace/build/lib/"
 BABEL_BINS="$WORKSPACE/deps/babeltrace/build/bin/"
 
+# pgrep
+PGREP=pgrep
 
 # Set platform variables
 case "$arch" in
@@ -342,8 +344,11 @@ if [ "$RUN_TESTS" = "yes" ]; then
     # Kill any LTTng-related process
     lttng_processes="$("$PGREP" -l 'lttng|gen-ust-.+')"
     if [ $? -eq 0 ]; then
+        echo "The following LTTng processes were detected running on the system and will be killed:"
+        echo "$lttng_processes"
+
         pids="$(cut -d ' ' -f 1 <<< "$lttng_processes" | tr '\n' ' ')"
-        kill -9 $pids
+        kill -SIGKILL $pids
     fi
 
     # Add 'babeltrace' binary to PATH
This page took 0.025322 seconds and 4 git commands to generate.