Use FairMQDevice::CatchSignals for Tutorial7

This commit is contained in:
Alexey Rybalchenko
2015-09-08 16:16:05 +02:00
committed by Mohammad Al-Turany
parent dc6fb4698c
commit 8b71e4d20b
11 changed files with 48 additions and 57 deletions

View File

@@ -12,7 +12,6 @@
* @author D. Klein, A. Rybalchenko
*/
#include <cstdlib> // quick_exit()
#include <sstream>
#include "FairMQSocketZMQ.h"
@@ -44,7 +43,7 @@ FairMQSocketZMQ::FairMQSocketZMQ(const string& type, const string& name, int num
if (fSocket == NULL)
{
LOG(ERROR) << "failed creating socket " << fId << ", reason: " << zmq_strerror(errno);
quick_exit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
if (zmq_setsockopt(fSocket, ZMQ_IDENTITY, &fId, fId.length()) != 0)
@@ -100,7 +99,7 @@ void FairMQSocketZMQ::Connect(const string& address)
{
LOG(ERROR) << "failed connecting socket " << fId << ", reason: " << zmq_strerror(errno);
// error here means incorrect configuration. exit if it happens.
quick_exit(EXIT_FAILURE);
exit(EXIT_FAILURE);
}
}