bind9/bin/check
Tony Finch a87ccea032 Fix hang in named-compilezone | head
I was truncating zone files for experimental purposes when I found
that `named-compilezone | head` got stuck. The full command line that
exhibited the problem was:

	dig axfr dotat.at |
	named-compilezone -o /dev/stdout dotat.at /dev/stdin |
	head

This requires a large enough zone to exhibit the problem, more than
about 70000 bytes of plain text output from named-compilezone.
I was running the command on Debian Stretch amd64.

This was puzzling since it looked like something was suppressing the
SIGPIPE. I used `strace` to examine what was happening at the hang.
The program was just calling write() a lot to print the zone file, and
the last write() hanged until I sent it a SIGINT.

During some discussion with friends, Ian Jackson guessed that opening
/dev/stdout O_RDRW might be the problem, and after some tests we found
that this does in fact suppress SIGPIPE.

Since `named-compilezone` only needs to write to its output file, the
fix is to omit the stdio "+" update flag.
2019-10-29 10:56:56 -05:00
..
win32 Make VS solution upgrading unnecessary 2019-09-26 15:11:15 +02:00
.gitignore added gitignore, removed cvsignore 2012-03-03 23:10:05 -08:00
check-tool.c Fix hang in named-compilezone | head 2019-10-29 10:56:56 -05:00
check-tool.h Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
Makefile.in add a search for GeoIP2 libraries in configure 2019-06-27 14:58:13 -07:00
named-checkconf.8 prep 9.15.2 2019-07-10 14:59:47 +00:00
named-checkconf.c Use the semantic patch to change the usage isc_mem_create() to new API 2019-09-12 09:26:09 +02:00
named-checkconf.docbook named-checkconf -i: ignore deprecate warnings 2019-06-28 11:02:59 +02:00
named-checkconf.html prep 9.15.2 2019-07-10 14:59:47 +00:00
named-checkzone.8 prep 9.13.6 2019-02-06 22:13:05 +00:00
named-checkzone.c Use the semantic patch to change the usage isc_mem_create() to new API 2019-09-12 09:26:09 +02:00
named-checkzone.docbook update copyrights 2019-01-02 10:20:43 +11:00
named-checkzone.html prep 9.13.6 2019-02-06 22:13:05 +00:00