diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-17 15:52:27 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-17 15:52:27 +0200 |
commit | 37ab187408799ba3f3f9107bdc5a72fea0b4b608 (patch) | |
tree | b4a0a376ba97b573e8e52cdae8893a136fa8b8e2 /src/Daemon/CrashWatcher.h | |
parent | 27967b17597a24e76f06871332d7a44eeb790a80 (diff) | |
download | abrt-37ab187408799ba3f3f9107bdc5a72fea0b4b608.tar.gz abrt-37ab187408799ba3f3f9107bdc5a72fea0b4b608.tar.xz abrt-37ab187408799ba3f3f9107bdc5a72fea0b4b608.zip |
rework unsafe handling of SIGINT/SIGTERM
Signals are asynchronous. It is unsafe to perform such complex
operations in a signal handler. I changed signal handler
to just set a flag, and added an event source which returns an event
when this variable is set. The action is to stop event loop.
Execution then falls through to program exit.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon/CrashWatcher.h')
-rw-r--r-- | src/Daemon/CrashWatcher.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Daemon/CrashWatcher.h b/src/Daemon/CrashWatcher.h index e5124789..d19da172 100644 --- a/src/Daemon/CrashWatcher.h +++ b/src/Daemon/CrashWatcher.h @@ -96,11 +96,12 @@ class CCrashWatcher /*FIXME not needed */ //DBus::Connection *m_pConn; CSettings *m_pSettings; - public: + public: //CCrashWatcher(const std::string& pPath,DBus::Connection &connection); CCrashWatcher(const std::string& pPath); - virtual ~CCrashWatcher(); + virtual ~CCrashWatcher(); void Run(); + void StopRun(); /* methods exported on dbus */ public: |