0

For the following code, since fork() method is not supported under Windows, I am wondering how to best migrate it to Windows?

import mmap
import os

mm = mmap.mmap(-1, 13)
mm.write(b"Hello world!")

pid = os.fork()

if pid == 0:  # In a child process
    mm.seek(0)
    print(mm.readline())

    mm.close()
biluochun2010
  • 109
  • 1
  • 7
  • Does this answer your question? [What's the equivalence of os.fork() on Windows with Python?](https://stackoverflow.com/questions/2738809/whats-the-equivalence-of-os-fork-on-windows-with-python) – Furkan Edizkan Sep 30 '22 at 14:53
  • https://stackoverflow.com/questions/2738809/whats-the-equivalence-of-os-fork-on-windows-with-python – Furkan Edizkan Sep 30 '22 at 14:54

0 Answers0