hstr
hstr copied to clipboard
Fix signal handler
The function “exit” does not belong to the list of async-signal-safe functions. I guess that a different program design will be needed for your function “signal_callback_handler_ctrl_c”.
Hints: perhaps exit() is not needed, use pattern from https://wiki.sei.cmu.edu/confluence/display/c/SIG30-C.+Call+only+asynchronous-safe+functions+within+signal+handlers