When I Ctrl C my linux program, I often get output that looks like a stack dump (crash).
Can I catch the Ctrl-C signal and exit gracefully?
Thank!
You can capture signals with Kernel.trap:
Kernel.trap
trap('INT') do # exit gracefully end
Source: https://habr.com/ru/post/1743644/More articles:Setting background image using javascript - javascriptcase insensitive in php - phpIs it really a thing like char or short in modern programming? - performanceHow to make SurfaceView always horizontal? - androidProblem starting mySQL - mysqlIs it possible to get namespace functionality inside a class? - namespacesC ++ Reading and Editing Raster Image Pixels - c ++Основные модели xhtml/css? - htmlDisplay data as a mind map - jqueryCreating a large matrix in ff - rAll Articles