This commit is contained in:
wuaho 2021-05-11 15:17:12 +08:00
parent 324de690ce
commit a44b9027b0

View File

@ -6,6 +6,7 @@ from v2.ipregion import IpSearch, Ip2Region
if __name__ == '__main__': if __name__ == '__main__':
pid = os.getpid() pid = os.getpid()
# 杀死所有进程
stop_shell = """#!/bin/bash stop_shell = """#!/bin/bash
echo `pstree -p {pid}`|awk 'BEGIN{{ FS="(" ; RS=")" }} NF>1 {{ print $NF }}'|xargs kill &>/dev/null echo `pstree -p {pid}`|awk 'BEGIN{{ FS="(" ; RS=")" }} NF>1 {{ print $NF }}'|xargs kill &>/dev/null
""" """