-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Change the behaviour of core::run::Program.destroy to forcibly terminate the program #5761
Conversation
start_program(...) would cause a segfault when p went out of scope due to out_file/err_file being closed twice.
names now being capitalized.
forcibly terminate the program (as suggested in issue rust-lang#5632)
Perhaps this should use |
That sounds reasonable. There is the question of how the SIGTERM equivalent should work on Windows, though - it looks like a can of worms to implement such a thing, and it only works for GUI apps (http://stackoverflow.com/questions/2055753/how-to-gracefully-terminate-a-process). I suppose the Windows equivalent of the SIGTERM sender could either do nothing or alternatively just call TerminateProcess like the the SIGKILL equivalent does. It might be safer if it did nothing because on Unix SIGTERM may well be ignored by the target process. |
force_destroy() that sends SIGKILL - as suggested by @thestinger.
@thestinger I have added a new commit with the changes you suggested. Both |
As proposed in issue #5632. I added some new stuff to libc - hopefully correctly. I only added a single signal constant (SIGKILL) because adding more seems complicated by differences between platforms - and since it is not required for issue #5632 then I figure that I can use a further pull request to flesh out the SIG* constants more.
This is a follow-up to #5761. Its purpose is to make core::libc more consistent - it currently only defines SIGKILL and SIGTERM, because they are the only values that happen to be needed by libcore. This adds all the posix signal value constants, except for those that have different values on different architectures. The output of the command `man 7 signal` was used to compile these signal values.
…1995 Improvements for `type_repetition_in_bounds` lint Some improvements for `type_repetition_in_bounds`: - add a configurable threshold to trigger the lint (rust-lang#4380). The lint won't trigger anymore if there are more bounds (strictly) than `conf.max_trait_bounds` on this type. - take generic args into account over bounded type (rust-lang#4323) - don't lint for predicates generated in macros (rust-lang#4326) Fixes rust-lang#4380, Fixes rust-lang#4323, Fixes rust-lang#4326, Closes rust-lang#3764 changelog: Fix multiple FPs in `type_repetition_in_bounds` and add a configuration option Note: the rust-lang#3764 has already been fixed but not closed
As proposed in issue #5632.
I added some new stuff to libc - hopefully correctly. I only added a single signal constant (SIGKILL) because adding more seems complicated by differences between platforms - and since it is not required for issue #5632 then I figure that I can use a further pull request to flesh out the SIG* constants more.