[New-bugs-announce] [issue38055] Starting multiprocessing.Process causes FileNotFoundError

Donny Brown report at bugs.python.org
Sun Sep 8 10:06:55 EDT 2019


New submission from Donny Brown <donny.hikari at gmail.com>:

Starting multiprocessing.Process causes FileNotFoundError in certain case:

```
import multiprocessing as mp
import time

def demo(f):
    print(f)

def main():
    cxt=mp.get_context('spawn')
    f=cxt.Value('i', 0)
    p=cxt.Process(target=demo, args=[f])
    p.start()

    return p

if __name__ == "__main__":
    p=main()
    p.join()
```

In this example, 'f' is supposed to stay in memory since it is referred by p._args. However, starting the process raises FileNotFoundError once there is not explicit reference to the arguments passed to the new process in the original process.

----------
components: Interpreter Core
files: test.py
messages: 351328
nosy: Donny Brown, davin, pitrou
priority: normal
severity: normal
status: open
title: Starting multiprocessing.Process causes FileNotFoundError
versions: Python 3.7
Added file: https://bugs.python.org/file48598/test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38055>
_______________________________________


More information about the New-bugs-announce mailing list