Skip to content

Instantly share code, notes, and snippets.

@jizhilong
jizhilong / kill_child_processes.py
Created September 24, 2013 16:37
how to kill a process's child processes in python
#!/usr/bin/env python
import multiprocessing
import time
import subprocess, os, signal, sys
def test(s):
while True:
print s
time.sleep(1.5)