在线程返回代码7中运行curl_easy_perform时出现问题

时间:2019-07-01 06:31:56

标签: libcurl

当curl_easy_perform在线程返回代码7中运行但不在主线程中运行时。 内核2.36.2 uClibc-0.9.33 libpthread.so-0.9.33.2

curl_east_perform在以下代码中可以很好地工作:

int main(void)  {
CURL * curl = curl_easy_inint;
curl_easy_setopt();
curl_east_perform(curl);
curl_easy_cleanup;
return 0;
}

curl_east_perform将始终在以下代码中返回7:

int main(void) {
curl_global_init(CURL_GLOBAL_ALL);
pthread_create(pid, NULL, curl_run_process, NULL);
return 0;
}
void *curl_run_process(void *arg) {
CURL *curl = curl_easy_init;
curl_easy_setopt();
curl_east_perform(curl);
curl_easy_cleanup;

} 

0 个答案:

没有答案