Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import zmq
- import sys
- import os
- import subprocess
- context = zmq.Context()
- print "parent", len(os.listdir("/proc/%i/fd" % os.getpid()))
- print subprocess.check_output(
- [sys.executable, "-c",
- """import os; print "child", len(os.listdir("/proc/%i/fd" % os.getpid()))"""])
- # output:
- # parent 15
- # child 15
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement