mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-08 07:09:21 +00:00
Signal handler with cleaner shutdown.
Window title and stuff. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@248 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#ifndef RTORRENT_SIGNAL_HANDLER_H
|
||||
#define RTORRENT_SIGNAL_HANDLER_H
|
||||
|
||||
#include <signal.h>
|
||||
#include <sigc++/slot.h>
|
||||
|
||||
class SignalHandler {
|
||||
public:
|
||||
typedef sigc::slot0<void> Slot;
|
||||
|
||||
static const unsigned int HIGHEST_SIGNAL = 32;
|
||||
|
||||
static void set_default(unsigned int signum);
|
||||
static void set_ignore(unsigned int signum);
|
||||
static void set_handler(unsigned int signum, Slot slot);
|
||||
|
||||
private:
|
||||
static void caught(int signum);
|
||||
|
||||
static Slot m_handlers[HIGHEST_SIGNAL];
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user