]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/console/conio.c
Restore all/done updates
[bacula/bacula] / bacula / src / console / conio.c
index 443ced781234ab5bbf757b0452aea9f37694fa7b..7447ead95e44beaa45364eab00605c762aad0e5a 100755 (executable)
@@ -834,11 +834,13 @@ static void rawmode(FILE *input)
 
    if (!termtype) {
       printf("Cannot get terminal type.\n");
-      exit(1);
+      normode();
+      _exit(1);
    }
    if (tgetent(term_buffer, termtype) < 0) {
       printf("Cannot get terminal termcap entry.\n");
-      exit(1);
+      normode();
+      _exit(1);
    }
    t_width = t_height = -1;
    t_width = tgetnum("co") - 1;
@@ -988,6 +990,10 @@ void clrbrk()
 static void sigintcatcher(int sig)
 {
    brkflg++;
+   if (brkflg > 1) {
+      normode();
+      _exit(1);
+   }
    signal(SIGINT, sigintcatcher);
 }