fix signal management on MacOS
This commit is contained in:
parent
ef3e78b6dc
commit
104d5dc717
1 changed files with 6 additions and 1 deletions
|
|
@ -32,7 +32,7 @@
|
||||||
#ifndef eoSIGContinue_h
|
#ifndef eoSIGContinue_h
|
||||||
#define eoSIGContinue_h
|
#define eoSIGContinue_h
|
||||||
|
|
||||||
#include <signal.h>
|
#include <csignal>
|
||||||
#include "eoContinue.h"
|
#include "eoContinue.h"
|
||||||
|
|
||||||
/** @addtogroup Continuators
|
/** @addtogroup Continuators
|
||||||
|
|
@ -51,6 +51,11 @@ template< class EOT>
|
||||||
class eoSIGContinue: public eoContinue<EOT>
|
class eoSIGContinue: public eoContinue<EOT>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
#ifdef __APPLE__ // FIXME there should be a way to be more portable here
|
||||||
|
using sighandler_t = void (*)(int);
|
||||||
|
#endif
|
||||||
|
|
||||||
/// Ctor : installs the signal handler
|
/// Ctor : installs the signal handler
|
||||||
eoSIGContinue(int sig, sighandler_t fct)
|
eoSIGContinue(int sig, sighandler_t fct)
|
||||||
: _sig(sig), _fct(fct)
|
: _sig(sig), _fct(fct)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue