def resume_process(pid, manual=False): name = process.get_name(pid) if manual or (pid,name) in suspended_tasks: if process.resume_pid(pid): for pid, suspended_name in list(suspended_tasks): if name == suspended_name: suspended_tasks.remove((pid, name)) if manual: set_suspend_preference(name, "")
def exit(): for pid,_ in suspended_tasks: process.resume_pid(pid)