i write a thrift server with c++. when the server is running, i get a error:
Thrift: Fri Mar 24 11:21:31 2017 TServerSocket::acceptImpl() THRIFT_POLL() Interrupted system call Thrift: Fri Mar 24 11:21:31 2017 TServerTransport died: Unknown: Interrupted system call
but this error dosen't occur everiy time. from the error tips, thrift in THRIFT_POLL() function get a EINTER signal? how can i solve this proplem?
this is the code main()
int main(int argc, char **argv) {
// thread pool
shared_ptr<ServHandler> handler(new ServHandler());
shared_ptr<TProcessor> processor(new ServProcessor(handler));
shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
shared_ptr<TServerTransport> serverTransport(new TServerSocket(9090));
shared_ptr<ThreadManager> threadManager = ThreadManager::newSimpleThreadManager(5);
shared_ptr<PosixThreadFactory> threadFactory = shared_ptr<PosixThreadFactory>(new PosixThreadFactory());
threadManager->threadFactory(threadFactory);
threadManager->start();
printf("start...\n");
TThreadPoolServer server(processor,
serverTransport,
transportFactory,
protocolFactory,
threadManager);
server.serve();
printf("end\n");
return 0;
}