Use SIGINT and remove unecessary terminate

This commit is contained in:
_Frky 2021-12-31 16:02:14 +01:00
parent 81e6100713
commit e85f527ca6

View file

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