New submission from Donny Brown <donny.hik...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue38055>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to