aboutsummaryrefslogtreecommitdiff
path: root/joshua.c
diff options
context:
space:
mode:
Diffstat (limited to 'joshua.c')
-rw-r--r--joshua.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/joshua.c b/joshua.c
index f225ec9..5b5f27a 100644
--- a/joshua.c
+++ b/joshua.c
@@ -3,7 +3,13 @@
#include <curses.h>
#include <stdlib.h>
#include <util.h>
+#include <signal.h>
#define RANDOM_TIME 1
+void cleanup(int signum)
+{
+ endwin();
+ exit(0);
+}
void random_stuff(void) /* print random junk on the screen for about 3 seconds */
{
clear();
@@ -19,6 +25,7 @@ void be_joshua()
{
initscr();
clear();
+ signal(SIGINT, &cleanup);
/*
start_color();
init_pair(1, COLOR_BLUE, COLOR_BLACK);