mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
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:
parent
ed97a8dc21
commit
03cf4ef197
4 changed files with 71 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue