dynamic_analysis.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:dynamic-firmware-analysis 作者: secjey 项目源码 文件源码
def signal_handler(sig, frame):
    """Handles signals sent by the user.
    In the case the SIGINT signal is received, child processes will be stopped.
    """
    if sig == signal.SIGINT:
        print(bcolors.OKBLUE + "\n[-] The program is stopping..." + bcolors.ENDC)
        procs = psutil.Process().children(recursive=True)
        try:
            for p in procs:
                p.terminate()
            gone, still_alive = psutil.wait_procs(psutil.Process().children(recursive=True), timeout=3)
            for p in still_alive:
                p.kill()
        except:
            pass
        sys.exit(0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号