Created
September 11, 2012 19:43
-
-
Save sidnei/3701493 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import select | |
import time | |
import fcntl | |
#from multiprocessing import Pipe | |
from billiard import Pipe | |
parent, child = Pipe() | |
pid = os.fork() | |
if pid: | |
time.sleep(2) | |
print "parent finished" | |
sys.exit(0) | |
else: | |
for i in xrange(10): | |
print child.poll(1) | |
print "child finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment