EliasOenal / multimon-ng

GNU General Public License v2.0
923 stars 206 forks source link

`quit()` and `deinit()` methods not called on unix signals #172

Open mrkeuz opened 3 years ago

mrkeuz commented 3 years ago

Hi, thanks for cool project, I'm long time search simple, easy to use CW-decoder which just works. Thank you very much! Works cool! šŸš€

But I faced with problem. I want to get statistics and fixed timings for my cw generator (cw package in Ubuntu). There is man pages section about MORSE_CW, that -v1 prints stats about CW speed autotuning. All statistics should print from morse_deinit() function, which called from quit() function by design.

But quit() function do not call (I debug this) seems due missing UNIX signal processing ā‡’ so morse_deinit() also not call. ā‡’ So statistics not printed as expected after exit.

Steps for reproduce:

  1. multimon-ng -v1 -a MORSE_CW
  2. Ctrl+C or SIGTERM (15)
  3. Nor quit(), morse_deinit() not call and program silently terminate

NOTE: Be carefully if you will debug with signals. By default, signal() function not working with GDB (I'm working in CLion). There is documentation: https://sourceware.org/gdb/current/onlinedocs/gdb/Signals.html

Ubuntu 20.04 The Latest version of multimon-ng