-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
[bug] ctrl-c doesn't cleanup child process #902
Comments
@prabirshrestha Just released a patch in 1.7.3, let me know if that works. |
Don't think it works. Works: tasks:
dev:
command: 'cargo run --package pkg1"'
options:
runFromWorkspaceRoot: true
runInCI: false
persistent: true Doesn't work: tasks:
dev:
command: 'watchexec --restart -w apps/server "cargo run --package pkg1"'
options:
runFromWorkspaceRoot: true
runInCI: false
persistent: true Running |
You can get my sample repro at https://github.com/prabirshrestha/moonrepo-rust-vite-template. Download latest moon. Then run |
@prabirshrestha How are you verifying that the server keeps running? I'm using While running:
After ctrl+c:
|
I'm using the same command as you are doing including my app telling I can't connect to the database (surrealdb via rocksdb) since it is in use. Here is a minimal repo project that you can try. Tried it with v1.10.0.
git clone https://github.com/prabirshrestha/moonrepo-rust-vite-template
cd moonrepo-rust-vite-template
moon run dev
Not sure if this is due to |
probably one way to solve this would be to create process group such that one can easily kill all jobs on the same group.
command: systemfd --no-pid -s http::8080 -- watchexec -r --stop-signal SIGTERM --stop-timeout=5 -w crates "cargo run" |
Yeah good idea. I'll look into a better way to handle signals, right now it's not my favorite implementation :P |
Reworked this in 1.26, can you give it a shot. https://moonrepo.dev/blog/moon-v1.26 |
Gonna close this. Can reopen if still an issue. |
Describe the bug
Child process is not killed when using ctrl-c.
using moon 1.7.2, rust 1.70.0, pnpm 8.5.1, vite 4.3.2
Steps to reproduce
watchexec-cli
in .moon/toolchain.ymlmoon run :dev --log debug
and wait for servers to both client and server to start.Expected behavior
Expect both client and server to terminate but only client is terminated and server continues to run.
Logs
I do see the following error. So my hunch here is the client does get killed (which it does) but since pnpm fails with exit 1 it probably fails and doesn't continue to kill the rest of the remaining tasks that started. I don't see any logs on the server quitting when pressing ctrl-c.
The text was updated successfully, but these errors were encountered: