summaryrefslogtreecommitdiff
path: root/tests/mini-record.c
diff options
context:
space:
mode:
authorAlexander Sosedkin <asosedkin@redhat.com>2021-08-27 17:10:37 +0200
committerAlexander Sosedkin <asosedkin@redhat.com>2021-08-30 11:06:32 +0200
commit01d3fa55d9a505b2d3d91c25e195463cf7e566b0 (patch)
treedd30e62f6a979087b654859f96591d3f63c5bea1 /tests/mini-record.c
parentc4017e1c298139134f8bcf781baee9f85b489377 (diff)
downloadgnutls-01d3fa55d9a505b2d3d91c25e195463cf7e566b0.tar.gz
tests: add a safeguard to terminate()
Add a safeguard to `terminate()` so that we don't kill whole pgroups. Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
Diffstat (limited to 'tests/mini-record.c')
-rw-r--r--tests/mini-record.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/mini-record.c b/tests/mini-record.c
index 8a912a425c..4081cdeb7a 100644
--- a/tests/mini-record.c
+++ b/tests/mini-record.c
@@ -214,6 +214,7 @@ pid_t child;
static void terminate(void)
{
+ assert(child);
kill(child, SIGTERM);
exit(1);
}