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

Signal handling #2133

Closed
kim opened this issue Jan 17, 2025 · 4 comments · Fixed by #2200
Closed

Signal handling #2133

kim opened this issue Jan 17, 2025 · 4 comments · Fixed by #2200
Assignees

Comments

@kim
Copy link
Contributor

kim commented Jan 17, 2025

Since #2011 , it is no longer possible to stop spacetimedb start by ^C. Killing the parent (spacetimedb-cli) will leave the child (spacetimedb-standalone) running.

OS: Linux

@kim
Copy link
Contributor Author

kim commented Jan 17, 2025

Of course, sometimes it does work.
I wonder if it may have to do with using the blocking process::Command inside an async function. Afaik, tokio‘s process::Command has extra machinery for signal handling.

@coolreader18
Copy link
Collaborator

Going back to using exec() should fix this on unix; I might look into whether this might also happen on windows.

@bfops
Copy link
Collaborator

bfops commented Jan 27, 2025

(We definitely need to determine whether this happens on Windows before considering this done)

@bfops
Copy link
Collaborator

bfops commented Jan 27, 2025

We should look for a library that abstracts over these platform-specific differences for process management.

If none exists, we'd like to copy the rustup code that solves a similar problem (and include comments that say "we copied this from rustup, pls no change")

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 a pull request may close this issue.

3 participants