mirror of
https://github.com/curl/curl.git
synced 2026-07-24 16:07:16 +03:00
tool and tests: force flush of all buffers at end of program
On Windows data can be lost in buffers in case of abnormal program termination, especially in process chains as seen due to flaky tests. Therefore flushing all buffers manually should avoid this data loss. In the curl tool we play the safe game by only flushing write buffers, but in the testsuite where we manage all buffers, we flush everything. This should drastically reduce Windows CI and testsuite flakiness. Reviewed-by: Daniel Stenberg Supersedes #7833 and #6064 Closes #8516
This commit is contained in:
parent
3b4a353025
commit
8b42d7b9d4
4 changed files with 20 additions and 5 deletions
|
|
@ -277,6 +277,11 @@ int main(int argc, char *argv[])
|
|||
main_free(&global);
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
/* Flush buffers of all streams opened in write or update mode */
|
||||
fflush(NULL);
|
||||
#endif
|
||||
|
||||
#ifdef __NOVELL_LIBC__
|
||||
if(!getenv("_IN_NETWARE_BASH_"))
|
||||
tool_pressanykey();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue