diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c index 7a575c98f6..1cd0524df6 100644 --- a/src/tool_cb_wrt.c +++ b/src/tool_cb_wrt.c @@ -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; }