Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv run spawns another process. #7343

Closed
pkucmus opened this issue Sep 12, 2024 · 2 comments
Closed

uv run spawns another process. #7343

pkucmus opened this issue Sep 12, 2024 · 2 comments
Labels
question Asking for clarification or support

Comments

@pkucmus
Copy link

pkucmus commented Sep 12, 2024

In the documentation uv run hello.py is used as an example (or the main way) on how to run a project. This assigns the PID 1 to uv and whatever uv spawns is another process - this is problematic when using Docker and need to send signals to your application, like sending SIGHUP, SIGTTIN, SIGTTOU to your container to inform Uvicorn to do something. Docker will only send the signals to the process sunning under PID 1 (here it's explained better then I ever could).

If the UV process can proxy all signals then I guess that would be fine but still I would not be too keen on running a different process in front of my web server, not for the reason of dependency management.

Might be related to: #7342 if uv could install into a non-virtual env (container's only Python)

@zanieb zanieb added the question Asking for clarification or support label Sep 12, 2024
@zanieb
Copy link
Member

zanieb commented Sep 12, 2024

You can easily bypass uv run in this context, with one of:

There's some active discussion about signal handling in #6738

@pkucmus
Copy link
Author

pkucmus commented Sep 13, 2024

My main concern of running the web server as the PID 1 process can be solved with the points you mentioned and I'll move the rest of the discussion into #6738.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

2 participants