Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist-console: flush cout after printing g_outputBuffer #8131

Merged
merged 1 commit into from Jul 29, 2019

Conversation

@dwfreed
Copy link
Contributor

@dwfreed dwfreed commented Jul 27, 2019

Short description

cout may not be a tty, in which case it is block buffered by stdlib, so flush it after printing g_outputBuffer.

Fixes #8130

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
cout may not be a tty, in which case it is block buffered by stdlib, so
flush it after printing g_outputBuffer.

Fixes PowerDNS#8130
@Habbie
Copy link
Member

@Habbie Habbie commented Jul 27, 2019

I was confused about why this patch makes a difference. The answer is that dnsdist uses _exit(...) a lot, which avoids the automatic flush on process exit.

@rgacogne rgacogne added this to the dnsdist-1.4.0 milestone Jul 29, 2019
@rgacogne rgacogne merged commit b3eb306 into PowerDNS:master Jul 29, 2019
27 checks passed
@dwfreed dwfreed deleted the dnsdist-flush-cout branch Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants