When is fflush(stderr) necessary?
andris at hpl.hp.com
Fri Aug 23 23:57:38 UTC 2002
The output of dig 2.X and 8.X is effectively non-blocking due to
calls to fflush(). Scripts are thus able to utilize dig as a
real-time resolver by piping a query into a waiting dig process
and reading the unblocked response on stdout.
dig 9.X will break such scripts because no calls to fflush() are
made. I'd like to fix this backwards incompatibility by submitting
a patch for the 9.3.0 snapshot based on an earlier posting:
Before doing so, however, I'm curious to know why the earlier versions
of dig call fflush(stderr). Since stderr is non-blocking by default,
aren't the calls to fflush(stderr) redundant?
More information about the bind-workers