casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SigHandler.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //# SigHandler.h: Definition of the signal handling class
3 //# Copyright (C) 2012
4 //# Associated Universities, Inc. Washington DC, USA.
5 //#
6 //# This library is free software; you can redistribute it and/or modify it
7 //# under the terms of the GNU Library General Public License as published by
8 //# the Free Software Foundation; either version 2 of the License, or (at your
9 //# option) any later version.
10 //#
11 //# This library is distributed in the hope that it will be useful, but WITHOUT
12 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14 //# License for more details.
15 //#
16 //# You should have received a copy of the GNU Library General Public License
17 //# along with this library; if not, write to the Free Software Foundation,
18 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
19 //#
20 //# Correspondence concerning AIPS++ should be addressed as follows:
21 //# Internet email: aips2-request@nrao.edu.
22 //# Postal address: AIPS++ Project Office
23 //# National Radio Astronomy Observatory
24 //# 520 Edgemont Road
25 //# Charlottesville, VA 22903-2475 USA
26 //#
27 //# $Id$
28 
29 #include <casa/aips.h>
30 #include <iostream>
31 #include <signal.h>
32 
33 //<example>
34 //
35 // </example>
36 
37 #ifndef SYNTHESIS_SIGHANDLER_H
38 #define SYNTHESIS_SIGHANDLER_H
39 
40 
41 namespace casa {
42 
43 
44 class SigHandler {
45 
46 public:
47  SigHandler();
48  ~SigHandler();
49 
50  static bool gotStopSignal();
51  static void setStopSignal(casacore::Bool lala);
52  //Reset handled signals back to default behavior
53  static void resetSignalHandlers();
54  //Will handle some signals; Abort and Interrupt
55  void setupSignalHandlers();
56  static void theHandler(int sig);
57 
58 protected:
59  static bool killOn_p;
60 
61 
62 private:
63 
64 };
65 
66 } // end namespace casa
67 #endif //
static bool gotStopSignal()
void setupSignalHandlers()
Will handle some signals; Abort and Interrupt.
static void setStopSignal(casacore::Bool lala)
static void resetSignalHandlers()
Reset handled signals back to default behavior.
static void theHandler(int sig)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
static bool killOn_p
Definition: SigHandler.h:59