Merge pull request #31 from ivre/fix-kill

Fix terminaison of processes in python test script
This commit is contained in:
Pierre 2022-01-01 18:16:46 +01:00 committed by GitHub
commit b068a2e617
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,7 @@ import atexit
import functools import functools
import logging import logging
import os import os
from signal import SIGINT
import subprocess import subprocess
import sys import sys
from time import sleep from time import sleep
@ -193,16 +194,16 @@ except AssertionError:
result = -1 result = -1
# terminate masscanned # terminate masscanned
masscanned.kill() masscanned.send_signal(SIGINT)
masscanned.wait() masscanned.wait()
# terminate capture # terminate capture
if TCPDUMP: if TCPDUMP:
tcpdump.kill() tcpdump.send_signal(SIGINT)
tcpdump.wait() tcpdump.wait()
if ZEEK_PASSIVERECON: if ZEEK_PASSIVERECON:
zeek.kill() zeek.send_signal(SIGINT)
zeek.wait() zeek.wait()
if P0F: if P0F:
p0f.kill() p0f.send_signal(SIGINT)
p0f.wait() p0f.wait()
sys.exit(result) sys.exit(result)