1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-01-06 14:21:57 +03:00

tests: trap signals in scripts

Closes #1098
This commit is contained in:
Viktor Szakats
2023-06-21 08:12:23 +00:00
parent ad7188456f
commit b2916b286b
2 changed files with 3 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ ec=0
if command -v grep >/dev/null 2>&1 && \
man --help 2>/dev/null | grep -q warnings; then
trap 'rm -f "$dstdir/man3"' EXIT
trap 'rm -f "$dstdir/man3"' EXIT HUP INT TERM
ln -sf "$mandir" "$dstdir/man3"

View File

@@ -91,7 +91,7 @@ chmod go-rwx \
${SSHD_FLAGS} &
sshdpid=$!
trap 'kill "${sshdpid}"; echo "# signal killing sshd"; exit 1;' EXIT
trap 'kill "${sshdpid}"; echo "# signal killing sshd"; exit 1;' EXIT HUP INT TERM
: "started sshd (${sshdpid})"
@@ -160,7 +160,7 @@ done
: "killing sshd (${sshdpid})"
kill "${sshdpid}" > /dev/null 2>&1
trap '' EXIT
trap '' EXIT HUP INT TERM
[ "${via_args}" = '1' ] && [ "${total}" != '1' ] && ec="${anyerror}"