Sat, 07 Mar 2015 14:32:09 +0100
Changed die() handler
thermferm/thermferm.c | file | annotate | diff | comparison | revisions |
--- 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); }