w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RtclSignalAction.hpp
Go to the documentation of this file.
1// $Id: RtclSignalAction.hpp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2013-05-17 521 1.0 Initial version
8// ---------------------------------------------------------------------------
9
14#ifndef included_Retro_RtclSignalAction
15#define included_Retro_RtclSignalAction 1
16
17// Note: on cpp environment _POSIX_C_SOURCE is already defined !!
18#include <signal.h>
19
20#include "tcl.h"
21
22#include "librtools/RerrMsg.hpp"
25
26namespace Retro {
27
29 public:
30
31 static bool Init(Tcl_Interp* interp, RerrMsg& emsg);
32 static RtclSignalAction* Obj();
33
34 bool SetAction(int signum, Tcl_Obj* pobj, RerrMsg& emsg);
35 bool GetAction(int signum, Tcl_Obj*& pobj, RerrMsg& emsg);
36 bool ClearAction(int signum, RerrMsg& emsg);
37
38 protected:
39 bool ValidSignal(int signum, RerrMsg& emsg);
40 void TclChannelHandler(int mask);
41 static void SignalHandler(int signum);
42 static void ThunkTclChannelHandler(ClientData cdata, int mask);
43 static void ThunkTclExitProc(ClientData cdata);
44
45 private:
46 RtclSignalAction(Tcl_Interp* interp);
48
49 protected:
50 Tcl_Interp* fpInterp;
53 Tcl_Channel fShuttleChn;
54 bool fActionSet[32];
56 struct sigaction fOldAction[32];
57
58 private:
60 };
61
62} // end namespace Retro
63
64//#include "RtclSignalAction.ipp"
65
66#endif
FIXME_docs.
Definition: RerrMsg.hpp:25
Implemenation (inline) of RtclOPtr.
Definition: RtclOPtr.hpp:23
static void ThunkTclChannelHandler(ClientData cdata, int mask)
FIXME_docs.
bool SetAction(int signum, Tcl_Obj *pobj, RerrMsg &emsg)
FIXME_docs.
void TclChannelHandler(int mask)
FIXME_docs.
struct sigaction fOldAction[32]
original sigaction
static RtclSignalAction * fpObj
pointer to singleton
static bool Init(Tcl_Interp *interp, RerrMsg &emsg)
FIXME_docs.
static RtclSignalAction * Obj()
FIXME_docs.
bool fActionSet[32]
true if SetAction() done
int fFdPipeWrite
attn pipe write fd
bool ClearAction(int signum, RerrMsg &emsg)
FIXME_docs.
static void ThunkTclExitProc(ClientData cdata)
FIXME_docs.
Tcl_Channel fShuttleChn
Tcl channel.
bool GetAction(int signum, Tcl_Obj *&pobj, RerrMsg &emsg)
FIXME_docs.
bool ValidSignal(int signum, RerrMsg &emsg)
FIXME_docs.
Tcl_Interp * fpInterp
Tcl interpreter used.
int fFdPipeRead
attn pipe read fd
RtclOPtr fpScript[32]
action scripts
static void SignalHandler(int signum)
FIXME_docs.
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47