[ create a new paste ] login | about

Link: http://codepad.org/a3tUizvI    [ raw code | output | fork ]

Python, pasted on Oct 11:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from subprocess import *
from threading import *

THREAD_COUNT=50

def worker():
    p = Popen(["cat"], stdin=PIPE, stdout=PIPE, stderr=STDOUT)
    out = p.communicate("hoge")[0]
    print "%s %s" % (current_thread().name, out)

threads = []
for i in range(THREAD_COUNT):
    worker()


Output:
1
Disallowed system call: SYS_pipe


Create a new paste based on this one


Comments: