signalclasses.h
// Copyright (c) 1999-2002 David Muse
// See the COPYING file for more information.
#ifndef RUDIMENTS_SIGNALCLASSES_H
#define RUDIMENTS_SIGNALCLASSES_H
#include <rudiments/private/signalclassesincludes.h>
class signalsetprivate;
class RUDIMENTS_DLLSPEC signalset {
friend class signalmanager;
friend class signalhandler;
public:
signalset();
~signalset();
bool addSignal(int32_t signum);
bool addAllSignals();
bool removeSignal(int32_t signum);
bool removeAllSignals();
int32_t signalIsInSet(int32_t signum) const;
#include <rudiments/private/signalset.h>
};
class RUDIMENTS_DLLSPEC signalmanager {
public:
static bool sendSignal(pid_t processid, int32_t signum);
static bool raiseSignal(int32_t signum);
static uint32_t alarm(uint32_t seconds);
static bool ignoreSignals(const signalset *sset);
static bool waitForSignals(const signalset *mask);
static bool examineBlockedSignals(signalset *sset);
};
class signalhandlerprivate;
class RUDIMENTS_DLLSPEC signalhandler {
public:
signalhandler();
~signalhandler();
void setHandler(void (*handler)(int32_t));
void (*getHandler())(int32_t);
bool handleSignal(int32_t signum);
bool handleSignal(int32_t signum, signalhandler *oldhandler);
void removeAllFlags();
void addFlag(int32_t flag);
void removeFlag(int32_t flag);
int32_t getFlags() const;
void setMask(const signalset *sset);
const signalset *getMask() const;
static bool isSignalHandlerIntUsed();
#include <rudiments/private/signalhandler.h>
};
#endif