我的php代码中的libcurl似乎无限期地卡在poll
调用中。当我对进程id做了一个strace时,
[user@server ~]$ sudo strace -p 19559
Process 19559 attached - interrupt to quit
poll([{fd=7, events=POLLIN}], 1, 1000) = 0 (Timeout)
poll([{fd=7, events=POLLIN}], 1, 0) = 0 (Timeout)
poll([{fd=7, events=POLLIN}], 1, 1000) = 0 (Timeout)
poll([{fd=7, events=POLLIN}], 1, 0) = 0 (Timeout)
poll([{fd=7, events=POLLIN}], 1, 1000) = 0 (Timeout)
poll([{fd=7, events=POLLIN}], 1, 0) = 0 (Timeout)
poll([{fd=7, events=POLLIN}], 1, 1000) = 0 (Timeout)
poll([{fd=7, events=POLLIN}], 1, 0) = 0 (Timeout)
poll([{fd=7, events=POLLIN}], 1, 1000) = 0 (Timeout)
这无限期地持续下去。 fd 7在/ proc / 19559 / fd中显示为
lrwx------ 1 root root 64 Sep 19 19:44 7 -> socket:[335178801]
有人能告诉我为什么会这样。我可以做些什么来使libcurl在超时时退出