record-camera-and-screen/stop_process_by_pid.py

5 lines
96 B
Python

import os,signal
pid = input('输入进程id:')
print(os.kill(int(pid) , signal.CTRL_C_EVENT))