]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/console/conio.c
Restore all/done updates
[bacula/bacula] / bacula / src / console / conio.c
index d40aef88bb605f1e7cf5f0008b9c74ea97f70b4e..7447ead95e44beaa45364eab00605c762aad0e5a 100755 (executable)
@@ -9,7 +9,7 @@
         
 */
 /*
-   Copyright (C) 2000-2003 Kern Sibbald and John Walker
+   Copyright (C) 1981-2004 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -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;
@@ -987,7 +989,11 @@ void clrbrk()
 /* Interrupt caught here */
 static void sigintcatcher(int sig)
 {
-   brkflg = 1;
+   brkflg++;
+   if (brkflg > 1) {
+      normode();
+      _exit(1);
+   }
    signal(SIGINT, sigintcatcher);
 }