Ctrl-C
kevinlawler.com
Ctrl-C
1–10 of 94 posts
Re: Ctrl-C
#2Good explanation here of shutdown hooks: https://www.baeldung.com/jvm-shutdown-hooks
Re: Ctrl-C
#3Re: Ctrl-C
#4After decades of experience I learned to use ctrl-\ (break) or ctrl-z and then kill -9 %1. Hope this helps someone.
Re: Ctrl-C
#5Re: Ctrl-C
#6Re: Ctrl-C
#7Laugh all you want, but this is is precisely why I like "old-fashioned" asynchronous exceptions (the ones which unwind the stack), and ensure most programs are ready to handle a clean stack unwind at practically any point inside the program (e.g. asynchronous-unwind-tables).
Re: Ctrl-C
#8Earlier quoted context omitted.
Which is exactly what the author is saying shouldn't be needed.
Author is talking about looking up PIDs, kill -9 %1 saves you from that.
Re: Ctrl-C
#9Maybe I'm missing something here but… so what? If at the end of your Ctrl+C signal handler you exit() as expected, then the OS will clean up your process's memory anyway.
Re: Ctrl-C
#10After decades of experience I learned to use ctrl-\ (break) or ctrl-z and then kill -9 %1. Hope this helps someone.
* https://www.mit.edu/people/dpolicar/writing/prose/text/think...