Skip to content

Instantly share code, notes, and snippets.

View youngsofun's full-sized avatar

Yang Xiufeng youngsofun

View GitHub Profile
import sys
from six.moves import range
import time
import psutil
import resource
import random
M = 1024*1024
p = psutil.Process()
d = {}
import multiprocessing
import threading
import time
import os
import psutil
import sys
import errno
def worker():
print('warker start')
@youngsofun
youngsofun / kill_child_processes.py
Created March 16, 2018 03:02 — forked from jizhilong/kill_child_processes.py
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)