From ad87b2875e7ab428c74416e5bc2c963d74356849 Mon Sep 17 00:00:00 2001
From: Francisco Acosta <fco.ja.ac@gmail.com>
Date: Mon, 10 Sep 2018 23:28:42 +0200
Subject: [PATCH] dist/tools/jlink: remove setsid for launching JLinkExe for
 term

When executing `make test` on devices using JLink, testrunner
launches `make term` which calls `jlink.sh term_rtt`. When finished
the father process is killed but `setsid` has launched JLinkExe
as another subprocess, which is not killed by `os.killpg` from
testrunner since it doesn't belong to the same group.
---
 dist/tools/jlink/jlink.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dist/tools/jlink/jlink.sh b/dist/tools/jlink/jlink.sh
index 83c88e0dd5..b59b64c3e7 100755
--- a/dist/tools/jlink/jlink.sh
+++ b/dist/tools/jlink/jlink.sh
@@ -240,7 +240,7 @@ do_term() {
     # don't trapon Ctrl+C, because JLink keeps running
     trap '' INT
     # start Jlink as RTT server
-    setsid sh -c "${JLINK} ${JLINK_SERIAL} \
+    sh -c "${JLINK} ${JLINK_SERIAL} \
             -device '${JLINK_DEVICE}' \
             -speed '${JLINK_SPEED}' \
             -if '${JLINK_IF}' \
-- 
GitLab