-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Restart doesn't work with cargo run
that starts a server
#16
Comments
As of f3c6df8, we use We still need to handle when |
That was quick :). Tried out watchexec 1.1.1, but restarting still runs into the same problem. Was it expected to be fixed with 1.1.1 (not sure from your description)? |
Targeting this feature for 1.2. 1.1.1 was a bugfix for 1.1. Trying to get signal handling in so we can shutdown cleanly and destroy the process group at exit now. Unfortunately, Rust's signal situation is pretty barebones at the moment. |
This landed in 1.2.0. Give it a try! |
Yes, works nicely now :)! 🎉 |
With a simple Iron server project that listens on a port, the restarting doesn't work (on MacOS):
The reason for this is that the restart didn't successfully kill the subprocess that
cargo run
started, hence "Address already in use".Note that
cargo watch
has exactly the same problem: watchexec/cargo-watch#25The cargo developers recommend using a process group and then killing the process group to make sure all subprocesses are killed: rust-lang/cargo#2818 (comment)
The text was updated successfully, but these errors were encountered: