[英]Poco AsyncChannel does not exit on forked process exit
Problem: 问题:
Call/Initialize Poco code from inside a C library, using loader (3rd party C program, our code is in c++). 使用加载程序(第三方C程序,我们的代码在c ++中)从C库内部调用/初始化Poco代码。
Now the question: Is this a problem with gcc that Forking a process does not call the constructors and just duplicates the memory? 现在的问题是:这是gcc的问题,即分叉进程不调用构造函数而只是复制内存吗? I have tried calling _queue.clear() inside AsyncChannel::AsyncChannel() but no results...
我尝试在AsyncChannel :: AsyncChannel()内部调用_queue.clear()但没有结果...
Has anyone seen this problem before? 有人看过这个问题吗? any proposed solution?
有什么建议的解决方案吗?
Response here: 在这里回应:
http://pocoproject.org/forum/viewtopic.php?f=10&t=6378 http://pocoproject.org/forum/viewtopic.php?f=10&t=6378
Summary: create threads after fork and not before. 摘要:在fork之后而不是之前创建线程。 Same problem with Poco::Util::Timer and other classes also.
Poco :: Util :: Timer和其他类的问题也相同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.