mirror of
https://github.com/curl/curl.git
synced 2026-07-06 18:07:16 +03:00
tool_cb_write.c: handle EINTR on flush
Report-and-patch-by: Nils Goroll Fixes #17061 Closes #17063
This commit is contained in:
parent
01c429c4a8
commit
a5be8e2c3f
1 changed files with 6 additions and 1 deletions
|
|
@ -364,7 +364,12 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
|
|||
|
||||
if(config->nobuffer) {
|
||||
/* output buffering disabled */
|
||||
int res = fflush(outs->stream);
|
||||
int res;
|
||||
do {
|
||||
res = fflush(outs->stream);
|
||||
/* Keep retrying in the hope that it is not interrupted sometime */
|
||||
/* !checksrc! disable ERRNOVAR 1 */
|
||||
} while(res && errno == EINTR);
|
||||
if(res)
|
||||
return CURL_WRITEFUNC_ERROR;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue