1 /* 2 * Common shutdown functionality. 3 * 4 * Copyright (C) 2013 Paul Boddie 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 */ 11 12 #include <stdio.h> 13 #include <stdlib.h> 14 #include <ubb/ubb.h> 15 16 /** 17 * Handle termination of the process. 18 */ 19 void init_shutdown(int signum) 20 { 21 printf("Closing...\n"); 22 ubb_close(0); 23 exit(1); 24 }