Skip to content
  • hjuvi's avatar
    5a589e4b
    Stop the main loop in the signal handler · 5a589e4b
    hjuvi authored
    
    
    In the signal handler, instead of restoring the configuration of the
    terminal and then raising the signal (SIGINT), a better practice is to
    just stop the main loop, so that the main function can do the cleanup
    and exit normally (as with the 'q' key).
    
    Also register this signal handler for SIGTERM (sent by kill).
    
    Signed-off-by: default avatarCédric Marie <cedric@hjuvi.fr.eu.org>
    5a589e4b
    Stop the main loop in the signal handler
    hjuvi authored
    
    
    In the signal handler, instead of restoring the configuration of the
    terminal and then raising the signal (SIGINT), a better practice is to
    just stop the main loop, so that the main function can do the cleanup
    and exit normally (as with the 'q' key).
    
    Also register this signal handler for SIGTERM (sent by kill).
    
    Signed-off-by: default avatarCédric Marie <cedric@hjuvi.fr.eu.org>
Loading