PISM, A Parallel Ice Sheet Model  stable v0.5
src/base/pism_signal.c
Go to the documentation of this file.
00001 /*
00002  Copyright (C) 2007 Jed Brown
00003 
00004  This file is part of Pism.
00005 
00006  Pism is free software; you can redistribute it and/or modify it under the
00007  terms of the GNU General Public License as published by the Free Software
00008  Foundation; either version 2 of the License, or (at your option) any later
00009  version.
00010 
00011  Pism is distributed in the hope that it will be useful, but WITHOUT ANY
00012  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00013  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00014  details.
00015 
00016  You should have received a copy of the GNU General Public License
00017  along with Pism; if not, write to the Free Software
00018  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019 */
00020 
00021 #include "pism_signal.h"
00022 
00023 volatile sig_atomic_t pism_signal;
00024 
00025 void pism_signal_handler(int sig) {
00026 
00027   pism_signal = sig;
00028 
00029   signal(sig, pism_signal_handler);
00030 }
00031 
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines