mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-22 18:19:42 +00:00
Prevent unbuffered stderr I/O on Windows
Make stderr fully buffered on Windows to improve named performance when it is logging to stderr, which happens e.g. in system tests. Note that: - line buffering (_IOLBF) is unavailable on Windows, - fflush() is called anyway after each log message gets written to the default stderr logging channels created by libisc.
This commit is contained in:
parent
27cd2c7c23
commit
c72da3497d
@ -1398,6 +1398,17 @@ main(int argc, char *argv[]) {
|
|||||||
(void) ProfilerStart(NULL);
|
(void) ProfilerStart(NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
/*
|
||||||
|
* Prevent unbuffered I/O from crippling named performance on Windows
|
||||||
|
* when it is logging to stderr (e.g. in system tests). Use full
|
||||||
|
* buffering (_IOFBF) as line buffering (_IOLBF) is unavailable on
|
||||||
|
* Windows and fflush() is called anyway after each log message gets
|
||||||
|
* written to the default stderr logging channels created by libisc.
|
||||||
|
*/
|
||||||
|
setvbuf(stderr, NULL, _IOFBF, BUFSIZ);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Record version in core image.
|
* Record version in core image.
|
||||||
* strings named.core | grep "named version:"
|
* strings named.core | grep "named version:"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user