binutils-gdb/gdb/unittests
Tom Tromey 36033ef57c Do not reopen temporary files
The current callers of mkostemp close the file descriptor and then
re-open it with fopen.  It seemed better to me to continue to use the
already-opened file descriptor, so this patch rearranges the code a
little in order to do so.  It takes care to ensure that the files are
only unlinked after the file descriptor in question is closed, as
before.

gdb/ChangeLog
2018-10-27  Tom Tromey  <tom@tromey.com>

	* unittests/scoped_fd-selftests.c (test_to_file): New function.
	(run_tests): Call test_to_file.
	* dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
	temporary files.
	* common/scoped_fd.h (scoped_fd::to_file): New method.
2018-10-27 11:58:41 -06:00
..
basic_string_view
optional
array-view-selftests.c
cli-utils-selftests.c
common-utils-selftests.c
environ-selftests.c
format_pieces-selftests.c
function-view-selftests.c
lookup_name_info-selftests.c
memory-map-selftests.c
memrange-selftests.c
mkdir-recursive-selftests.c
observable-selftests.c
offset-type-selftests.c
optional-selftests.c
parse-connection-spec-selftests.c
ptid-selftests.c
rsp-low-selftests.c
scoped_fd-selftests.c Do not reopen temporary files 2018-10-27 11:58:41 -06:00
scoped_mmap-selftests.c
scoped_restore-selftests.c
string_view-selftests.c
tracepoint-selftests.c
unpack-selftests.c
utils-selftests.c
xml-utils-selftests.c