Python fork(): passing data from child to parent Python fork(): passing data from child to parent numpy numpy

Python fork(): passing data from child to parent


multiprocessing's queue implementation works. Internally, it pickles data to a pipe.

q = multiprocessing.Queue()if (os.fork() == 0):    print(q.get())else:    q.put(5)# outputs: 5