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 the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/pyinstaller/a43cb133-14bc-4e0b-8df0-9372fdd962ean%40googlegroups.com.