Open GoogleCodeExporter opened 9 years ago
This one occurs because we send SIGKILL (-9) to subprocesses on Ctrl-Shift-C,
whereas
a terminal sends SIGINT. The difference is that some applications have special
handling for SIGINT (and ping is one of them).
Originally, we were sending SIGINT. The difficulty here is that allowing
processes
to continue on after receiving SIGINT clashed a bit with the Hotwire pipeline
model,
where pipelines can be either running or not; there is no in-between.
I think if we wanted to fix this well, we need a more complex state machine in
hotwire/command.py. Currently there's just "running" and "cancelled" that are
relevant here. But to do this right, we'd need "running",
"running-cancel-requested", and "cancelled". From "running", we send SIGINT,
then
change to "running-cancel-requested". Only once the builtin sends back that
it's
successfully cancelled do we go from "running-cancel-requested" to "cancelled".
Original comment by cgwalt...@gmail.com
on 29 Feb 2008 at 9:38
I think this is a pretty huge problem... Ctrl-Shift-C needs to send SIGINT, by
default.
Why must Hotwire keep track of the fact that SIGINT was sent to the process?
The
processing is "running" when it's running, and it should be considered
"cancelled"
when it exits.
If you want some other button that sends SIGKILL for terminating processes that
aren't playing nice, then that's fine. But it certainly shouldn't be default
behavior.
I guess I just don't understand why the Hotwire model needs to change in order
to
switch to using SIGINT instead of SIGKILL. Instead of changing state to
"cancelled"
when C-Shift-C is *pressed*, it could simply do that when the child process
exits.
Original comment by terat...@gmail.com
on 6 Oct 2008 at 9:59
Original issue reported on code.google.com by
dmi...@gmail.com
on 29 Feb 2008 at 6:01