chiark / gitweb /
stest: If one of our secnets dies, call the test a failure
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 25 Nov 2019 00:01:34 +0000 (00:01 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Dec 2019 17:08:50 +0000 (17:08 +0000)
commit752e2c0592530a73ac4cc18bddfed81a9f813f19
tree8b65cfd1a571cb83dcba8f6a997c3ddaef046758
parent80f1bf0d2e13e2157bc87173a8665280627e3b18
stest: If one of our secnets dies, call the test a failure

This involves use of TclX's `signal' facility.  In my tests it was
easy to make Tcl deadlock by doing too much work in the signal
handler.  In particular reaping children is a bad idea.  Also signals
are not blocked during the signal handler so it would have to be
reentrant.

Instead, use `after idle'.  That is quite soon enough for the reap to
run, and in my tests with TclX 8.4 it all works properly.

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