Call multiprocessing.freeze_support so frozen builds do not lose messages

LXMF validates propagation stamps in a multiprocessing worker pool. In
frozen builds the workers crashed on circular imports and hung the pool,
so propagation transfers were accepted at the link level but their
messages were silently discarded during validation. Senders saw
delivered, recipients saw nothing.

Calling multiprocessing.freeze_support before other imports lets worker
processes bootstrap correctly. Reproduced with a standalone frozen test
that hung indefinitely without the call and completes with it.
This commit is contained in:
Jascha 2026-08-23 15:59:21 -07:00
parent df5aea94ea
commit 79e1fe8e53

View file

@ -1,5 +1,12 @@
#!/usr/bin/env python
import multiprocessing
# required for multiprocessing to work in frozen builds (e.g. lxmf stamp validation worker pools)
# without it, worker processes re-run the app instead of bootstrapping, which hangs the pool
# must run before other imports so worker processes exit into their bootstrap immediately
multiprocessing.freeze_support()
import argparse
import io
import json