mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-17 02:21:47 +00:00
Use FairMQDevice::CatchSignals for Tutorial7
This commit is contained in:
committed by
Mohammad Al-Turany
parent
dc6fb4698c
commit
8b71e4d20b
@@ -12,7 +12,6 @@
|
||||
* @author D. Klein, A. Rybalchenko
|
||||
*/
|
||||
|
||||
#include <cstdlib> // quick_exit()
|
||||
#include <sstream>
|
||||
|
||||
#include "FairMQLogger.h"
|
||||
@@ -25,7 +24,7 @@ FairMQContextZMQ::FairMQContextZMQ(int numIoThreads)
|
||||
if (fContext == NULL)
|
||||
{
|
||||
LOG(ERROR) << "failed creating context, reason: " << zmq_strerror(errno);
|
||||
quick_exit(EXIT_FAILURE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (zmq_ctx_set(fContext, ZMQ_IO_THREADS, numIoThreads) != 0)
|
||||
|
@@ -12,8 +12,6 @@
|
||||
* @author A. Rybalchenko
|
||||
*/
|
||||
|
||||
#include <cstdlib> // quick_exit()
|
||||
|
||||
#include <zmq.h>
|
||||
|
||||
#include "FairMQPollerZMQ.h"
|
||||
@@ -74,7 +72,7 @@ FairMQPollerZMQ::FairMQPollerZMQ(map<string, vector<FairMQChannel>>& channelsMap
|
||||
{
|
||||
LOG(ERROR) << "At least one of the provided channel keys for poller initialization is invalid";
|
||||
LOG(ERROR) << "Out of Range error: " << oor.what() << '\n';
|
||||
quick_exit(EXIT_FAILURE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +111,7 @@ FairMQPollerZMQ::FairMQPollerZMQ(FairMQSocket& cmdSocket, FairMQSocket& dataSock
|
||||
else
|
||||
{
|
||||
LOG(ERROR) << "invalid poller configuration, exiting.";
|
||||
quick_exit(EXIT_FAILURE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +165,7 @@ bool FairMQPollerZMQ::CheckInput(const string channelKey, const int index)
|
||||
{
|
||||
LOG(ERROR) << "Invalid channel key: \"" << channelKey << "\"";
|
||||
LOG(ERROR) << "Out of Range error: " << oor.what() << '\n';
|
||||
quick_exit(EXIT_FAILURE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +184,7 @@ bool FairMQPollerZMQ::CheckOutput(const string channelKey, const int index)
|
||||
{
|
||||
LOG(ERROR) << "Invalid channel key: \"" << channelKey << "\"";
|
||||
LOG(ERROR) << "Out of Range error: " << oor.what() << '\n';
|
||||
quick_exit(EXIT_FAILURE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user