aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-08-03 11:26:51 +0000
committerOmar Polo <op@omarpolo.com>2024-08-03 11:26:51 +0000
commit36d6d35389b484468658971ad75437c3358a962c (patch)
treef184f81d8793b07301127d834933b8fd75e9e90a
parent5c44bf912b2e750484052be4aed540a27b92485d (diff)
regress: fix quit()
-rw-r--r--regress/lib.sh3
-rw-r--r--regress/tests.sh4
2 files changed, 4 insertions, 3 deletions
diff --git a/regress/lib.sh b/regress/lib.sh
index 330d18d..d5e9609 100644
--- a/regress/lib.sh
+++ b/regress/lib.sh
@@ -194,11 +194,12 @@ count() {
}
quit() {
- pid="$(cat gmid.pid || true)"
+ pid="$(cat gmid.pid || true)" 2>/dev/null
if [ "$pid" != "" ]; then
kill $pid || true
wait || true
fi
+ rm gmid.pid
}
onexit() {
diff --git a/regress/tests.sh b/regress/tests.sh
index cfc7c6a..0e07d19 100644
--- a/regress/tests.sh
+++ b/regress/tests.sh
@@ -523,7 +523,7 @@ test_ipv6_server() {
}
test_high_prefork() {
- kill "$(cat gmid.pid)" 2>/dev/null || true
+ quit
setup_simple_test 'prefork 12'
@@ -531,7 +531,7 @@ test_high_prefork() {
check_reply "20 text/gemini" "# hello world" || return 1
dont_check_server_alive=yes
- kill "$(cat gmid.pid)" 2>/dev/null || true
+ quit
}
test_proxy_protocol_v1() {