Jun-26-2020, 10:24 PM
This works for me. On linux
#! /usr/bin/env python3 import subprocess import os def get_pid(name): return subprocess.check_output(['pidof', name]) info = get_pid('bash').split() pid = int(info[0]) print(pid) os.kill(pid, True)
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags