-
Notifications
You must be signed in to change notification settings - Fork 34
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
some way to kill a running process? #27
Comments
This is going to run into an issue with |
It's possible we could use process groups on Unix and Windows to handle killing. See:
|
Ah and there's Rust stdlib support for this kind of: https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html |
Process groups is designed for this sort of thing, and I think I can get it working. However, it has one huge downside, which is that taking child processes out of the parent's group means that Ctrl-C no longer the children automatically (by sending a signal to the parent's entire group). I'm not sure there's a workaround for this that doesn't require the parent to specially handle that signal, as I think shells do. |
OMG NO! There's a chance this can work for real. There's a This sort of thing seems to be the norm on Windows, where PIDs don't get recycled until all handles are closed. That's actually a lot nicer than Unix :p https://blogs.msdn.microsoft.com/oldnewthing/20110107-00/?p=11803/ |
Relevant: rust-lang/rust#38903 |
Looks like |
Maybe it's ok to accept a race condition on OSX here? We kind of have to with no pipe2 support anyway. |
Probably
start
will need to keep more data around. We might need another type of explicit tree to mirror the expression tree, which knows how towait
andkill
its children, similar to Rust's stdlib.The text was updated successfully, but these errors were encountered: