1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import os import pcmp c = pcmp.Channel() pid = os.fork() if pid == 0: c.child() c.send('Hola papi!') print c.recv() else: c.parent() c.send("Hola hijito!") print c.recv() os.wait()