O'Reilly logo
  • María Teresa Rebollo Alonso thinks this is interesting:

newRef=os.getpid()

From

Cover of Learning Concurrency in Python

Note

It could be a typo. As the next paragraph suggests, the code should be:

newRef=os.fork()

As documentation (https://docs.python.org/3/library/os.html) states:

"Fork a child process. Return 0 in the child and the child’s process id in the parent"