aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2015-05-22 21:20:44 -0400
committerFranklin Wei <git@fwei.tk>2015-05-22 21:20:44 -0400
commit9e53ccfefd2433452fdfa2bbe2ece903c0afb790 (patch)
treef0e9c0c5a3f152e1d05c5fd8da0b76b21d3bedd9 /src/util.c
parent06d3b96728f44c32a918eac21c6ec2995bf62a94 (diff)
downloadmarket-sim-9e53ccfefd2433452fdfa2bbe2ece903c0afb790.zip
market-sim-9e53ccfefd2433452fdfa2bbe2ece903c0afb790.tar.gz
market-sim-9e53ccfefd2433452fdfa2bbe2ece903c0afb790.tar.bz2
market-sim-9e53ccfefd2433452fdfa2bbe2ece903c0afb790.tar.xz
support ctrl-c
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index a198d19..f0493cd 100644
--- a/src/util.c
+++ b/src/util.c
@@ -6,6 +6,13 @@
void cleanup(void)
{
curl_global_cleanup();
+ endwin();
+}
+
+void sig_handler(int sig)
+{
+ cleanup();
+ exit(EXIT_FAILURE);
}
struct data_buffer_t {