I have a bottle project where the process loads a lot of data. With reloader=True, typing ^C on the bottle process means the memory-heavy child remains alive. And it's holding the port open.
In Linux, this is easy to deal with by using a parent death signal:
It'd be great if this could be fixed on windows too - it's driven me mad countless times. Can't python add a shutdown hook to kill the process upon KeyboardInterrupt?
I have a bottle project where the process loads a lot of data. With reloader=True, typing ^C on the bottle process means the memory-heavy child remains alive. And it's holding the port open.
In Linux, this is easy to deal with by using a parent death signal:
That's not very pretty code, sorry, but I think that this would be a good default behavior under Linux.