selftests: netfilter: kill running process only

Avoid noise like the following:
nft_flowtable.sh: line 250: kill: (4691) - No such process

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Fabian Frederick 2020-08-07 21:32:20 +02:00 committed by Pablo Neira Ayuso
parent dd08734d8a
commit d8bb9abe21

View File

@ -250,8 +250,14 @@ test_tcp_forwarding_ip()
sleep 3
kill $lpid
kill $cpid
if ps -p $lpid > /dev/null;then
kill $lpid
fi
if ps -p $cpid > /dev/null;then
kill $cpid
fi
wait
check_transfer "$ns1in" "$ns2out" "ns1 -> ns2"