c++中的Curl_easy_perform会停止用于其他用途的计时器
curl_easy_perform in c++ stops a timer used for something else.
当我在我的c程序中使用curl_easy_perform时,它以某种方式停止了我用于检查其他内容的计时器。
这是我的代码:
curl_easy_setopt(curl, CURLOPT_URL, query.c_str());
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, changeddata.c_str());
result = curl_easy_perform(curl);
在没有更多信息的情况下,我猜测curl_easy_perform()会产生一个信号,这会打乱您的计时器。在调用curl_easy_perform():
之前尝试添加这个curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
告诉curl不要使用任何安装信号处理程序或导致信号发送到进程的函数。参见curl_easy_setopt手册页
相关文章:
- 程序没有问 3 个问题,而是将我对第一个问题的回答用于其他两个问题
- 用于对项目进行分组并将单个项目映射到其他组成员的数据结构
- 将其他函数中的变量用于主函数C++
- 相同的 for 循环适用于其他项目,但不适用于此项目。为什么?
- 在Visual Studio中包括用于其他PC的库
- 在 Eclipse 中漂亮的打印C++适用于某些项目,而不适用于其他项目
- 在一个类中向向量添加元素不适用于其他类
- openssl 是否需要熵用于生成证书和密钥以外的其他目的?
- 如何将用于创建文件的文件的路径提供给C++中的其他文件夹
- 重载流<<运算符,用于指针/共享指针和其他类型的
- COUT不适用于我的其他Turbo C 合并
- (C )正在创建专门用于处理所有其他自定义对象的类/对象一种处理项目的正确方法
- complex.h 适用于 Win32 目标以外的其他编译器,例如代码编辑器工作室 (CCS)
- 适用于 VIM 的 YouCompleteMe 插件 - 如何支持其他库方法的自动完成?(例如OpenMPI)
- 访问void函数中的变量以用于其他函数?C++
- 现代C和C :可以将一个定义的结构用于其他声明的结构
- 如果您称为destructor并将分配的内存再次用于其他对象,会发生什么
- 如何使C枚举类型可用于其他语言
- 提取模板类中的类型以用于其他模板
- 函数模板可用于本地lambda,但不能用于其他函数