0
私はトランプサーバーをC++で作成します。サーバが動作しているとき、私はエラーを取得:thrift TServerSocket :: acceptImpl()THRIFT_POLL()中断されたシステムコール
スリフト:金3月24日11時21分31秒2017 TServerSocket :: acceptImpl()THRIFT_POLL()システムコールに割り込み スリフト:金3月24日11時21分31秒2017 TServerTransportが死亡:不明:中断されたシステムコール
このエラーは発生しません。エラーのヒントから、THRIFT_POLL()関数のthriftはEINTERシグナルを取得しますか?どのように私はこのproplemを解決することができますか?
これはコードの主(ある)
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;
}