thermferm/thermferm.c

changeset 326
ae34b47700bb
parent 321
b95baa89c509
child 328
1713dc0cd20f
--- a/thermferm/thermferm.c	Sat Mar 07 13:36:45 2015 +0100
+++ b/thermferm/thermferm.c	Sat Mar 07 14:32:09 2015 +0100
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * Copyright (C) 2014
+ * Copyright (C) 2014-2015
  *   
  * Michiel Broek <mbroek at mbse dot eu>
  *
@@ -87,6 +87,10 @@
 			break;
 	case SIGTERM:	syslog(LOG_NOTICE, "Got SIGTERM, shutting down");
 			break;
+	case SIGSEGV:	syslog(LOG_NOTICE, "Got SIGSEGV, shutting down");
+			my_shutdown = TRUE;
+			exit(SIGSEGV);
+			break;
 	default:	syslog(LOG_NOTICE, "die() on signal %d", onsig);
     }
 
@@ -100,7 +104,7 @@
 {
     char	buf[21];
 
-    snprintf(buf, 20, "Old mode %s", UNITMODE[current_unit->mode]);
+    snprintt(buf, 20, "Old mode %s", UNITMODE[current_unit->mode]);
     lcdPuts(lcdHandle, buf);
     lcdPosition(lcdHandle, 0, 1);
 }

mercurial