raganmd
3/30/2018 - 6:09 AM

touch-quit-process-by-id.py

# matthew ragan | matthewragan.com

import os
import signal

# first we need to find our process ID
# which we can grab from the dictionary 
# we put into storage
pid = parent().fetch('other_app')['app_id']

# next we can kill this process based 
# only on its process id
os.kill(pid, signal.SIGTERM)

parent().unstore("*")