A onefile application runs in a temporary directory so tampering with the original executable would go unnoticed (although I wouldn’t call that guaranteed behaviour). That temporary directory would be inherited by the multiprocessing child but also be cleaned up when the original process exits. You'd really want your subprocess to re-extract and run in a fresh temporary directory so subprocess.run([sys.executable], env={**os.environ, "PYINSTALLER_RESET_ENVIRONMENT": "1"}) might do it (although this kind of application self-management/auto updating is something I wish people would just stop doing so I’m not feeling particularly minded to prove it out).
A onefile application runs in a temporary directory so tampering with the original executable would go unnoticed (although I wouldn’t call that guaranteed behaviour). That temporary directory would be inherited by the multiprocessing child but also be cleaned up when the original process exits. You'd really want your subprocess to re-extract and run in a fresh temporary directory so subprocess.run([sys.executable], env={**os.environ, "PYINSTALLER_RESET_ENVIRONMENT": "1"}) might do it (although this kind of application self-management/auto updating is something I wish people would just stop doing so I’m not feeling particularly minded to prove it out).
--
You received this message because you are subscribed to a topic in the Google Groups "PyInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyinstaller/JpJALIrfqgw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyinstaller...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pyinstaller/a43cb133-14bc-4e0b-8df0-9372fdd962ean%40googlegroups.com.