dangerzone/dangerzone
Alexis Métaireau 418b68d4ca
Avoid passing wrong options -B to subprocesses
This is a common pitfall of pyinstaller, when using multiprocessing.

In our case, the spawned processes is passed the -B option, thinking
it's python (but it's dangerzone).

> -B     Don't write .pyc files on import. See also PYTHONDONTWRITEBYTECODE.

As a result, dangerzone is spawned with the -B option, which doesn't
mean anything for it.

> In the frozen application, sys.executable points to your application
> executable. So when the multiprocessing module in your main process
> attempts to spawn a subprocess (a worker or the resource tracker), it
> runs another instance of your program, with the following arguments for
> resource tracker:
>
> my_program -B -S -I -c "from multiprocessing.resource_tracker import main;main(5)"

https://pyinstaller.org/en/stable/common-issues-and-pitfalls.html#multi-processing
2025-03-17 17:47:42 +01:00
..
container_helpers Symlink /usr in Debian container image 2025-01-27 21:40:27 +02:00
conversion Symlink /usr in Debian container image 2025-01-27 21:40:27 +02:00
gui Avoid passing wrong options -B to subprocesses 2025-03-17 17:47:42 +01:00
isolation_provider Run ruff format 2025-01-23 14:48:33 +01:00
__init__.py Add an import preference for vendored packages 2024-10-15 14:58:06 +03:00
args.py Always use sys.exit when exiting the application 2024-05-09 15:57:42 +03:00
cli.py Run ruff format 2025-01-23 14:48:33 +01:00
container_utils.py Factor out container utilities to separate module 2024-12-10 11:31:39 +02:00
document.py Provide sanitized version of output filename 2024-10-17 15:33:58 +03:00
errors.py Factor out container utilities to separate module 2024-12-10 11:31:39 +02:00
logic.py Add a --debug flag to the CLI to help retrieve more logs 2025-01-16 11:35:06 +01:00
settings.py fix: do not catch bare exceptions 2024-06-05 14:19:31 +02:00
util.py Drop Ubuntu 20.04 (Focal) support 2025-03-17 15:40:25 +02:00