What's the equivalence of os.fork() on Windows with Python?
Posted
by prosseek
on Stack Overflow
See other posts from Stack Overflow
or by prosseek
Published on 2010-04-29T15:59:51Z
Indexed on
2010/04/29
16:07 UTC
Read the original article
Hit count: 169
This code works well in Mac/Linux, but not in Windows.
import mmap import os map = mmap.mmap(-1, 13) map.write("Hello world!") pid = os.fork() if pid == 0: # In a child process print 'child' map.seek(0) print map.readline() map.close() else: print 'parent'
- What's the equivalent function of os.fork() on Windows?
© Stack Overflow or respective owner