Handle SIGHUP

Handle SIGHUP so that the registered exit handlers are called to restore
the terminal back to its orignal state.
This commit is contained in:
Martin Lund 2022-03-18 19:19:03 +01:00
parent ed97a8dc21
commit 03cf4ef197
4 changed files with 71 additions and 1 deletions

View file

@ -29,11 +29,15 @@
#include "log.h"
#include "error.h"
#include "print.h"
#include "signals.h"
int main(int argc, char *argv[])
{
int status = 0;
/* Handle received signals */
signal_handlers_install();
/* Add error exit handler */
atexit(&error_exit);