Skip to content

Add uWSGI support and fix background process start method - #738

Merged
hansott merged 3 commits into
mainfrom
fix/uwsgi-protect-after-fork
Oct 8, 2026
Merged

hansott merged 3 commits into
mainfrom
fix/uwsgi-protect-after-fork

Conversation

@iacobdaniel

Copy link
Copy Markdown
Contributor

Add aikido_zen.decorators.uwsgi.postfork (mirrors the gunicorn decorator), docs/uwsgi.md, and update the sample app to use it, since uWSGI preforks workers and Zen must start after each fork.

Fix get_process_factory() to also force "fork" when the start method is unset, not just when it resolves to "forkserver" - macOS's unset default is "spawn", which re-execs sys.executable the same way "forkserver" does, and that re-exec fails under uWSGI, since sys.executable there is the uwsgi binary itself, not a real Python interpreter.

Comment thread aikido_zen/decorators/uwsgi.py Outdated
Comment thread aikido_zen/background_process/__init__.py Outdated
@hansott
hansott merged commit aa471a5 into main Oct 8, 2026
125 checks passed
@hansott
hansott deleted the fix/uwsgi-protect-after-fork branch October 8, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants