How are you getting the subprocess' pids? Note that psutil can only kill a process that is a child of the program. See if the code below prints anything useful and if so try killing the uid's as they are psuitl processes and not subprocesses processes (glad I don't have to try and say that). I use multiprocessing in these types of situations so can post an example using multiprocessing if you can't get subprocess to work.
for each_pid in pids: p = psutil.Process(each_pid) p_name = p.name() uid = p.uids().real print(p.name, p, uid)