00001 // $Id: TGo4SocketSignalHandler.h 884 2012-11-10 16:47:22Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum f�r Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #ifndef TGO4SOCKETSIGNALHANDLER_H 00015 #define TGO4SOCKETSIGNALHANDLER_H 00016 00017 #include "Rtypes.h" 00018 00019 class TGo4SocketSignalHandler { 00020 public: 00021 00022 TGo4SocketSignalHandler(Int_t signum, Bool_t enabled=kTRUE); 00023 00024 virtual ~TGo4SocketSignalHandler(); 00025 00026 static void SetSigWINCH(Bool_t enabled = kTRUE); 00027 00028 static bool IsLastSignalWINCH(); 00029 00030 static void DisableSigPipe(); 00031 00032 static void SetSignalAction(Int_t signum, Bool_t enabled=kTRUE); 00033 00034 static void Handle(int); 00035 00036 static Int_t GetLastSignal(); 00037 00038 static void SetLastSignal(Int_t v = 0); 00039 00040 private: 00041 TGo4SocketSignalHandler(); 00042 00043 static Int_t fgiLastSignal; 00044 }; 00045 00046 #endif //TGO4SOCKETSIGNALHANDLER_H