chiark / gitweb /
stest: Kill our child secnets when we call finish
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 25 Nov 2019 00:01:01 +0000 (00:01 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 30 Dec 2019 13:15:49 +0000 (13:15 +0000)
This stops them hanging around and, often, printing more stuff after
the test has actually failed.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
stest/common.tcl

index e9ca6583e56581e798248fe4aefe6db585e0bcb8..388320a8cf2f8805a454a00ce377baac4a914fd6 100644 (file)
@@ -210,6 +210,11 @@ prefix_preload $builddir/stest/udp-preload.so
 
 proc finish {estatus} {
     puts stderr "FINISHING $estatus"
+    signal default SIGCHLD
+    global pidmap
+    foreach pid [array names pidmap] {
+       kill KILL $pid
+    }
     exit $estatus
 }